Nazo Posted September 13, 2008 Posted September 13, 2008 (edited) expandcollapse popupGlobal $Paused = 1 ; Paused Global $Time = 0 Global $Time2 = 0 Global $Time3 = 0 HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{Insert}", "Terminate") AdlibEnable("Addfunction", 100) AdlibEnable("Addfunction2", 100) AdlibEnable("Addfunction3", 100) while 1 Sleep(100) If $Paused = 1 Then ToolTip('P',0,0) Sleep(100) EndIf wEnd Func TogglePause() If $Paused = 1 Then $Paused = 0 ToolTip("") Else $Paused = 1 EndIf EndFunc Func Addfunction() If $Paused = 0 Then $coord = PixelSearch( 0, 56, 140, 56, 0x054eb3) If Not @error Then $Time += 100 If $Time = 15000 Then Send("{F11}") $Time = 0 EndIf EndIf EndIf EndFunc Func Addfunction2() If $Paused = 0 Then $coord = PixelSearch( 0, 42, 121, 42, 0xaa0316) If Not @error Then $Time2 += 100 If $Time2 = 15000 Then Send("{F10}") $Time2 = 0 EndIf EndIf EndIf EndFunc Func Addfunction3() If $Paused = 0 Then $coord = PixelSearch( 0, 28, 136, 28, 0x9f682c) If Not @error Then $Time3 += 100 If $Time3 = 500 Then Send("{F12}") $Time3 = 0 EndIf EndIf EndIf EndFunc Func Terminate() Exit 0 EndFunc This program should search for 3 different colours and then send 3 different buttons with specific delays but only last function is activated while program is unpaused. I need them all activated on the same time and when i'll pause program again it must stops immediately without ending started functions. What should i change here? Edited September 13, 2008 by Nazo
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now