Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <MsgBoxConstants.au3>
- HotKeySet("{F7}", "quit")
- $begin = TimerInit()
- $timeDif = 0
- $orderCount = 0
- $quitFlag = 0
- $defaultClass = "[CLASS:#32770]"
- $yes = "是(&Y)"
- $orderInterface = "[TITLE:网上股票交易系统5.0]"
- while true
- if WinExists($defaultClass,$yes) then
- WinActivate($defaultClass,$yes)
- ControlClick($defaultClass, "", 6 )
- ContinueLoop
- elseif not $quitFlag then
- order()
- elseif sleep(1000) and WinActive($orderInterface) then
- $info = "统计", "委托单:" & $orderCount &@CRLF & "耗时:" & $timeDif & "s"
- MsgBox($MB_SYSTEMMODAL, $info)
- exit
- else
- ContinueLoop
- endif
- wend
- func order()
- do
- ControlSetText($orderInterface, "", 1032,"519888")
- ControlSetText($orderInterface, "", 1033,"0.010")
- ControlSetText($orderInterface, "", 1034,"3000")
- until (ControlGetText($orderInterface, "", 1032)="519888" and ControlGetText($orderInterface, "", 1033)="0.010" and ControlGetText($orderInterface, "", 1034)="1000")
- ControlClick($orderInterface,"",1006)
- $orderCount +=1
- endfunc
- Func quit()
- $timeDif = Int(TimerDiff($begin)/1000)
- $quitFlag += 1
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement