找回密码
 加入
搜索
查看: 3088|回复: 5

[GUI管理] 判断文本文件

  [复制链接]
发表于 2010-5-20 21:06:23 | 显示全部楼层 |阅读模式
判断文本文件内读取数字为1还是2

1选择运行 A文件

2选择运行 B文件  的判断式因该用哪个函数来表达
发表于 2010-5-20 22:28:30 | 显示全部楼层
看到楼主发的帖子我终于感到内心平衡了许多。
发表于 2010-5-20 22:42:42 | 显示全部楼层
楼上不厚道 你暗爽可以,但是顺手帮楼主解决问题嘛

fileread读出文件内容
if 文件内容=1 then run(a文件)
if 文件内容=2 then run(b文件)
发表于 2010-5-20 23:02:03 | 显示全部楼层
#include <File.au3>
_FileCreate("test.txt") 
_FileWriteToLine("test.txt", 1, "1", 1);"1"改成"2"试试
$s = FileRead(FileOpen("test.txt", 0), 1)
If $s = '1' Then Run('calc.exe')
If $s = '2' Then Run('notepad.exe')
FileClose($s)
 楼主| 发表于 2010-5-21 19:41:19 | 显示全部楼层
呼呼...其实后来就解决了.../

我是这样解决的

if stringinstr($Bxwl6,"1") then
Run($exe1)
elseif stringinstr($Bxwl6,"2") then
Run($exe2)
EndIf
Exit
发表于 2010-5-23 01:28:30 | 显示全部楼层
受教,谢谢!!!!!!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-21 06:07 , Processed in 0.074319 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表