|
最近刚刚接触au3,需要定时关闭某个程序,但是一直没有成功。
还请大神指导下,程序错在哪里,源码如下:
if @HOUR >= 16 and @MIN >= 30 and ProcessExists ("EzOES_ASHR.exe") Then
;关闭A 股集中报盘程序
$SJSA = WinActivate("上交所新一代交易系统 A 股集中报盘程序")
if $SJSA<>0 Then
if WinActivate($SJSA)<> 0 Then
WinSetState("上交所新一代交易系统 A 股集中报盘程序" , "" , @SW_SHOW)
;显示窗口上交所新一代交易系统 A 股集中报盘程序
FileWriteLine ($file, @HOUR & @MIN & @SEC & " " & "准备关闭A 股集中报盘程序" )
Send ("!o")
Send ("a")
Sleep (500)
Send ("!o")
Send ("t")
Sleep (500)
WinWaitActive ("停止确认","",2)
Send ("!y")
Sleep (500)
Send ("!o")
Send ("q")
WinWaitActive ("确认","",2)
Sleep (500)
Send ("!y")
if not ProcessExists("EzOES_ASHR.exe") Then
FileWriteLine ($file, @HOUR & @MIN & @SEC & " " & "A 股集中报盘程序已关闭" )
EndIf
EndIf
EndIf
EndIf |
|