hsanyue 发表于 2015-2-12 09:43:42

如何在autoit 中使用带变量的批处理命令,20元人民币求教

现在遇到一个问题,我需要在AU3中,通过@comspec 来调用批处理命令,但是这个命令中需要一个,我在AU3中读取的一个变量,如果把变量放入‘’中,则变成字符串,求教,示例:

local $ID = Fileread("ID.txt")
Run(@ComSpec & ' /cgetinfomation.ext-U username -P password -N $ID',"",@SW_HIDE)
,
$ID 不能放入引号内,我尝试着将$ID用&连接,貌似不行。就是写成这样
local $ID = Fileread("ID.txt")
Run(@ComSpec & ' /cgetinfomation.ext-U username -P password -N '&$ID,@SW_HIDE)

有愿意赐教的,联系QQ 85251 3252
20元人民币酬谢

afan 发表于 2015-2-12 11:05:50

是不是空格的原因local $ID = StringStripWS(FileRead('ID.txt'), 3)
Run(@ComSpec & ' /c getinfomation.ext -U username -P password -N ' & $ID, @SW_HIDE)

caianhua1986 发表于 2015-5-6 10:20:01

我还在想,怎么能够快点 赚金钱呢。

fyq 发表于 2015-5-8 09:38:09

我还在想,怎么能够快点 赚金钱呢。
页: [1]
查看完整版本: 如何在autoit 中使用带变量的批处理命令,20元人民币求教