版主:
想利用autoit实现自动开机启动运行金字塔,下述代码有的地方通不过,请版主帮忙修改下。
谢谢!
#include <date.au3>
Dim $result,$tmp1,$path,$JZTloginname,$JZTloginpassword
$path="D:\Weisoft Stock(CTP)0609\"
$JZTloginname="8306xxxx"
$JZTloginpassword="xxxxxx"
While 1
If ProcessExists("winstock.exe") And WinExists("金字塔决策交易系统") Then
ProcessClose("winstock.exe")
Sleep(3000)
EndIf
if WinExists("金字塔决策交易系统")=0 And ((@HOUR=8And@MIN>=50) or HOUR>=9) And @HOUR<=22 then
$result=0
RUn($path&"winstock.exe",$path)
WinWaitActive("欢迎使用金字塔","",20)
WinActive("金字塔决策交易系统")
ControlFocus("欢迎使用金字塔","","Edit1")
ControlSetText("欢迎使用金字塔","","Edit1",$JZTloginname)
ControlFocus("欢迎使用金字塔","","Edit2")
ControlSetText("欢迎使用金字塔","","Edit2",$JZTloginpassword)
ControlFocus("欢迎使用金字塔","","Button2")
ControlClick("欢迎使用金字塔","","Button2")
WinWaitActive("金字塔决策交易系统","",30)
Sleep(1000)
WinActivate("金字塔决策交易系统")
If WinExists("系统消息") then
WinActivate("系统消息")
WinClose("系统消息")
Sleep(1000)
EndIf
WinActivate("金字塔决策交易系统")
Sleep(2000)
EndIf
WEnd
放在scite编辑器里,执行出现什么问题就修改什么问题了
if WinExists("金字塔决策交易系统")=0 And ((@HOUR=8And@MIN>=50) or HOUR>=9) And @HOUR<=22 then
$result=0
……
WinWaitActive("欢迎使用金字塔","",20)
WinActive("金字塔决策交易系统")
1,HOUR 要改成 @HOUR
2,括弧字体不对
请放个完整版上来,我也想用。