evilelf Posted September 24, 2007 Posted September 24, 2007 (edited) Hello I am trying to understand why this will not work. Now when i run this the first time it has no problems but when it starts over it never does this code. Yes there is more scrip but i cant show why would this be? While $NW = 0 Send("{A Down}") Sleep(50) Send("{A Up}") Sleep(20) PixelSearch(728,14,748,30,0xD5D0AE) If Not @error Then $NW = 1 Send("X") Sleep(1000) Send("{A Down}") Sleep(30) Send("{A Up}") EndIf WEnd Edited September 24, 2007 by evilelf
Moderators big_daddy Posted September 24, 2007 Moderators Posted September 24, 2007 Are you setting $NW back to 0 (zero) before attempting the loop again? If not if won't run because $NW already equals 1.
evilelf Posted September 24, 2007 Author Posted September 24, 2007 (edited) well i dont think i did this. Tell me this what would i look up in the "AutoIt Help File" or tell me a little about this. PS; Thanks Edited September 24, 2007 by evilelf
evilelf Posted September 24, 2007 Author Posted September 24, 2007 (edited) This Works people can look below if you did not know. ;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;; $Names;;;;;;;;; $NW = 0 $Rerun = 1 While $Rerun = 1 While $NW = 0 Send("{A Down}") Sleep(50) Send("{A Up}") Sleep(20) PixelSearch(728,14,748,30,0xD5D0AE) ; Some Code $NW = 0 WEnd WEnd Edited September 24, 2007 by evilelf
Moderators big_daddy Posted September 24, 2007 Moderators Posted September 24, 2007 Do i putIf that is the only place your using $NW then you could just do this. While 1 Send("{A Down}") Sleep(50) Send("{A Up}") Sleep(20) PixelSearch(728, 14, 748, 30, 0xD5D0AE) If Not @error Then Send("X") Sleep(1000) Send("{A Down}") Sleep(30) Send("{A Up}") ExitLoop EndIf WEnd
evilelf Posted September 24, 2007 Author Posted September 24, 2007 This Works people can look below if you did not know. ;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;; $Names;;;;;;;;; $NW = 0 $Rerun = 1 While $Rerun = 1 While $NW = 0 Send("{A Down}") Sleep(50) Send("{A Up}") Sleep(20) PixelSearch(728,14,748,30,0xD5D0AE) ; Some Code $NW = 0 WEnd WEnd This works just fine for me.
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