bingxinchi 发表于 2010-5-20 21:06:23

判断文本文件

判断文本文件内读取数字为1还是2

1选择运行 A文件

2选择运行 B文件的判断式因该用哪个函数来表达

foboy 发表于 2010-5-20 22:28:30

看到楼主发的帖子我终于感到内心平衡了许多。

sxd 发表于 2010-5-20 22:42:42

楼上不厚道 你暗爽可以,但是顺手帮楼主解决问题嘛

fileread读出文件内容
if 文件内容=1 then run(a文件)
if 文件内容=2 then run(b文件)

lynfr8 发表于 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)

bingxinchi 发表于 2010-5-21 19:41:19

呼呼...其实后来就解决了.../

我是这样解决的

if stringinstr($Bxwl6,"1") then
Run($exe1)
elseif stringinstr($Bxwl6,"2") then
Run($exe2)
EndIf
Exit

Kennylam 发表于 2010-5-23 01:28:30

受教,谢谢!!!!!!!
页: [1]
查看完整版本: 判断文本文件