请前辈指点,为什么程序不运行
刚刚开始接触AUTOIT3,写了如下测试脚本;\\Hewlett-Packard\\Remote Graphics Receiver\\rgreceiver.exe
if fileexists("C:\Program Files\Hewlett-Packard\Remote Graphics Receiver\rgreceiver.exe") Then
Run("C:\Program Files\Hewlett-Packard\Remote Graphics Receiver\rgreceiver.exe")
msgbox(1,"信息","运行 RGS?)
Else
MsgBox(1,"信息","找不到RGS客户端",)
EndIf
理论让应该执行rgreceiver.exe的执行文件,并显示该执行文件的窗口,可是死活是不行,请高手指点指点,谢谢
另外,如果把rgreceiver.exe改成NOTEPAD.exe就可以显示程序窗口
[ 本帖最后由 gnat 于 2009-1-6 15:04 编辑 ] 看看文件存在不?
回复 2# lantu 的帖子
文件存在,这是我为什么要加判断的原因试试看行不行?
;\\Hewlett-Packard\\Remote Graphics Receiver\\rgreceiver.exeIf FileExists(@ProgramFilesDir & "\Hewlett-Packard\Remote Graphics Receiver\rgreceiver.exe") Then
If MsgBox(33, "提示", "确定运行?") = 1 Then
Run(@ProgramFilesDir & "\Hewlett-Packard\Remote Graphics Receiver\rgreceiver.exe")
Else
Exit
EndIf
Else
MsgBox(0,"信息","找不到RGS客户端")
EndIf 原帖由 gnat 于 2009-1-6 15:57 发表 http://www.autoitx.com/images/common/back.gif
文件存在,这是我为什么要加判断的原因
还是不行。
换成下面的代码可以了,但是还是不知道为什么程序不能使用run()调用
;\\Hewlett-Packard\\Remote Graphics Receiver\\rgreceiver.exe
if fileexists("C:\Program Files\Hewlett-Packard\Remote Graphics Receiver\rgreceiver.exe") Then
;Run(@ComSpec &"/k C:\Program Files\Hewlett-Packard\Remote Graphics Receiver\rgreceiver.exe")
;run("notepad.exe")
Send("#r")
WinWaitActive("运行")
Send("C:\Program Files\Hewlett-Packard\Remote Graphics Receiver\rgreceiver.exe{Enter}")
WinWaitActive("HP Remote Graphics Receiver")
send("15.15.15.32{enter}")
Else
MsgBox(1,"信息","找不到RGS客户端",)
EndIf 怎么不行法?显示最后一句?死循环?........
页:
[1]