Avignale2 Posted May 15, 2010 Share Posted May 15, 2010 Hi i used to script in back in Auto IT v2, last time i can remember using it though was over a year ago, I have been looking at some tutorials and through the reference for the scripting language trying to piece it all back together but i get hung up over a simple pixel search. while @error = 0 PixelSearch( 830, 300, 840, 310, 0x000000 ) sleep(200) WEnd this is what i have to find the color black, and it is supposed to loop until it no longer finds the color black and end the loop. but I can't tell whats going on because once it gets to this part of the script it appears the lopp never ends as the rest of my script doesn't happen. I honestly remember using a different method for checking pixels for a color in a loop but i can't remember, and I've formated my computer so many times I can't go back and look though my old scripts. Link to comment Share on other sites More sharing options...
bogQ Posted May 15, 2010 Share Posted May 15, 2010 This shud probably work Global $Pixel Do $Pixel = PixelSearch( 830, 300, 840, 310, 0xFFFFFF ) Sleep(200) Until Not IsArray($Pixel) TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Avignale2 Posted May 15, 2010 Author Share Posted May 15, 2010 Thank you very much, I really like this method. It actually solved another problem i could tell was going to come up later on too. THank you for being such a nice fellow. Link to comment Share on other sites More sharing options...
Avignale2 Posted May 15, 2010 Author Share Posted May 15, 2010 I have an idea for a project but i am not sure if it is possible. My employment agency that I am signed up with posts interviews and such that they have set up for me on my own page in their site. www.jobsearch.gov.au and since the page is html, i thought hey maybe auto it can continually check the page for me and open up an sms program to tell me the details that were posted on my employment page!!! so 1st question does autoit have the ability to interact with a page without having to have a browser open? like can it interact in any meaningful way with an html page? Link to comment Share on other sites More sharing options...
DW1 Posted May 15, 2010 Share Posted May 15, 2010 Absolutely. Check out _INetGetSource() for starters. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Avignale2 Posted May 15, 2010 Author Share Posted May 15, 2010 Can i nest an If inside a Do Until? Link to comment Share on other sites More sharing options...
exodius Posted May 15, 2010 Share Posted May 15, 2010 (edited) Sure can ; Simple If...Then's can go on one line $x = 0 Do ToolTip($x, 0 ,0) If $x = 5 Then ExitLoop Sleep (1000) $x += 1 Until $x = 10 ; More complicated If...Then's have to go on three $x = 0 Do ToolTip($x, 0 ,0) If $x = 4 Then ExitLoop EndIf Sleep (1000) $x += 1 Until $x = 10 Edited May 15, 2010 by exodius Link to comment Share on other sites More sharing options...
Avignale2 Posted May 15, 2010 Author Share Posted May 15, 2010 The ExitLoop in the example, that Exits the Do until loop altogether? If so then that is pretty awesome Link to comment Share on other sites More sharing options...
somdcomputerguy Posted May 15, 2010 Share Posted May 15, 2010 Here's some links to help you out. Welcome to v3! And the Forum!Keyword ExitLoopAutoItAutoIt Wiki"C:\Program Files\AutoIt3\AutoIt.chm" - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. 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