dufran3 Posted March 31, 2011 Share Posted March 31, 2011 I have this loop in my code right now... $imageColor = PixelGetColor(376,533) $imageColorHex = Hex($imageColor) Do $imageColor = PixelGetColor(376,533) $imageColorHex = Hex($imageColor) ;MsgBox(0,'','In Loop Hex: ' & $ImageColorHex) Until $imageColorHex == '00FFFFFF' MsgBox(0,'','Out of Loop', 5) MouseClick('Left',376,533) ;New window The MsgBox inside the Do...Until loop, if it is commented out...my script pauses, and I don't get the "Out of Loop" message box. However, If I uncomment the msgbox in the Do loop, I get the msgbox in the loop, and the msgbox when it leaves the loop, and my mouseclick....?? Link to comment Share on other sites More sharing options...
BrewManNH Posted March 31, 2011 Share Posted March 31, 2011 I tested this snippet and it works ok for me. It will show the out of loop message box as soon as there is a white pixel at that spot and then moves the mouse to it. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
JohnOne Posted March 31, 2011 Share Posted March 31, 2011 I use sometimes console output for debugging and sometimes messagebox, but my choice of debugging small snippets is Beep() Try your code with Beep() Do $imageColor = PixelGetColor(376,533) $imageColorHex = Hex($imageColor) Beep(800,100) Until $imageColorHex == '00FFFFFF' Beep(600,100) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
dufran3 Posted March 31, 2011 Author Share Posted March 31, 2011 Weird, for some reason, the color of that pixel kept twiching....i moved one pixel over, no problem now! Link to comment Share on other sites More sharing options...
dufran3 Posted March 31, 2011 Author Share Posted March 31, 2011 (edited) Beep? lol, never used it...maybe I will give it a whirl Edit: not much information gained from beep, most the time I debug to get some sort of variable being passed, so it wouldn't help, but I do see it's uses. Edited March 31, 2011 by dufran3 Link to comment Share on other sites More sharing options...
JohnOne Posted March 31, 2011 Share Posted March 31, 2011 I Use Beep() at diferent frequencies for different expected situations, so I know whats going on with it even if I'm in my kitchen making a nice cup of tea AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
hannes08 Posted March 31, 2011 Share Posted March 31, 2011 I Use Beep() at diferent frequencies for different expected situations, so I know whats going on with it even if I'm in my kitchen making a nice cup of tea That's another great Idea of debugging. Great! I love it. I do have to try this in the next days. What do you think of running that in a big office? Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
JohnOne Posted April 1, 2011 Share Posted April 1, 2011 Its only any good if your script isnt reliant on super speed, but if you get it just right, your script sings to you baby! And if the melody is off you know about it straight away. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
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