UnknownWarrior Posted October 23, 2008 Posted October 23, 2008 I have a question relating to the Do/Until Function... if my code this: $Pixel = PixelGetColor(1, 1) While 1 Sleep(15000) Do $LPixel = $Pixel $Pixel = PixelGetColor(1, 1) Until $Pixel <> $LPixel Send("{F4}") Sleep(3000) Exit WEnd what i want to get out of this is: i want it to wait for the color at 1, 1 to CHANGE, once its CHANGED, i want it to continue on and send f4 and exit the program... but when i run it it sleeps 15 seconds, sends f4, and exits....... it completely skips the Do/Until any help would be fantabulous, thanks
muncherw Posted October 23, 2008 Posted October 23, 2008 Try using PixelChecksum to look for a change in your pixel color. instead of your do/until loop. Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]
FreeFry Posted October 23, 2008 Posted October 23, 2008 While 1 Sleep(15000) $LPixel = PixelGetColor(1, 1) Do $Pixel = PixelGetColor(1, 1) Until $Pixel <> $LPixel Send("{F4}") Sleep(3000) Exit WEnd Just removed the variable assignment in your Do Until loop.
UnknownWarrior Posted October 23, 2008 Author Posted October 23, 2008 (edited) While 1 Sleep(15000) $LPixel = PixelGetColor(1, 1) Do $Pixel = PixelGetColor(1, 1) Until $Pixel <> $LPixel Send("{F4}") Sleep(3000) Exit WEnd Just removed the variable assignment in your Do Until loop. EDIT: Works now, i had to leave the LPixel inside my while loop... ill test for further detail, thanks a bunch Edited October 23, 2008 by UnknownWarrior
muncherw Posted October 23, 2008 Posted October 23, 2008 EDIT: Works now, i had to leave the LPixel inside my while loop... ill test for further detail, thanks a bunchIt's good that it's working. In the future when you have something like that you should try throwing in a msgbox set to your variable inside the loop then you could see if it's hitting it or if the loop is set wrong. Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]
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