i have a script that works very nicely but recursion ocures very often because of the internal loop
can anyone rewrite this code so recursion wont apear and basicly will do the same thing??
[Only registered and activated users can see links. Click Here To Register...]
can anyone rewrite this code so recursion wont apear and basicly will do the same thing??
[Only registered and activated users can see links. Click Here To Register...]
Code:
HotKeySet("{F10}", "first")
While 1
Sleep(100)
WEnd
Func first()
Send("{SPACE}")
While 1
$pix = PixelSearch(429, 552, 431, 554, 0x548E04, 10)
If Not @error Then
Send("{SPACE DOWN}")
Call("second")
EndIf
WEnd
EndFunc ;==>first
Func second()
While 1
$pix2 = PixelSearch(506, 552, 508, 554, 0x709F05, 10)
If Not @error Then
Send("{SPACE UP}")
Call("third")
EndIf
WEnd
EndFunc ;==>second
Func third()
While 1
$pix3 = PixelSearch(424, 552, 426, 554, 0x5B4321, 10)
If Not @error Then
Send("{SPACE DOWN}")
Call("second")
EndIf
WEnd
EndFunc ;==>third