G4ORCE Posted April 4, 2010 Share Posted April 4, 2010 Hi, i'm Chris now ive got a script that works perfect but when it gets up the the pixel search part it does not find it straight away i need it to keep searching$coord = PixelSearch( 433, 823, 1243, 834, 0xC7FEFF, 11 ) If Not @error Then MouseDown("left") SLEEP(5000) MouseUp("left") for an amount of time. now i need it to keep searching till it finds it Link to comment Share on other sites More sharing options...
MiserableLife Posted April 4, 2010 Share Posted April 4, 2010 Have you looked at Loops in the Autoit help file ? Link to comment Share on other sites More sharing options...
G4ORCE Posted April 4, 2010 Author Share Posted April 4, 2010 yee ive looked but still cant seem to find out how to make it keep looking for the colour? Link to comment Share on other sites More sharing options...
MiserableLife Posted April 4, 2010 Share Posted April 4, 2010 You mean after you found the first one.. you want to continue looking for the second one? Link to comment Share on other sites More sharing options...
G4ORCE Posted April 4, 2010 Author Share Posted April 4, 2010 no i want it to keep trying to find the first one till it finds it? Link to comment Share on other sites More sharing options...
Paulie Posted April 4, 2010 Share Posted April 4, 2010 How to loop: While 1 ;Code to repeat here WEnd Link to comment Share on other sites More sharing options...
G4ORCE Posted April 4, 2010 Author Share Posted April 4, 2010 ok thanks mate could u help me out were to place that imm just new at autoit. expandcollapse popup$coord = PixelSearch( 0, 0, 1243, 834, 0xC7FEFF, 11 ) If Not @error Then MouseDown("left") SLEEP(5000) MouseUp("left") Mousemove(882, 490, 5000) sleep(100) MouseUp("left") Mousedown("left") ; Reaction Time sleep(5700) MouseDown("left") Send("{UP}") MouseUp("left") Mousedown("left") Else $coord = PixelSearch( 433, 823, 1243, 834, 0xC7FEFF, 10 ) If Not @error Then MouseDown("left") SLEEP(5000) MouseUp("left") EndIf endif thanks mate chirss. Link to comment Share on other sites More sharing options...
MiserableLife Posted April 4, 2010 Share Posted April 4, 2010 IF NewToAutoIt() Then FileRead(@AutoItDir & '\AutoIt Help File.chm') Link to comment Share on other sites More sharing options...
G4ORCE Posted April 4, 2010 Author Share Posted April 4, 2010 lol man imm bad wif help files could u put the While 1 ;Code to repeat here WEnd and ill ad the code in the code to repeat here pleasee. Link to comment Share on other sites More sharing options...
BrettF Posted April 4, 2010 Share Posted April 4, 2010 It seems you did not follow my advice. http://www.autoitscript.com/forum/index.php?showtopic=112549&view=findpost&p=788449 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
G4ORCE Posted April 4, 2010 Author Share Posted April 4, 2010 (edited) ive done that doesent work mate, it dose look ther but i need it to keep looking cause it takes awhile till that colour pops up in that postion. it is a amber light, while its rollinng the light is grey and it trys to find it but i need it to keep looking cause the car gets to the amber in like 5 seconds then it goes yellow i want it to stop when the yellow goes on. Edited April 4, 2010 by G4ORCE Link to comment Share on other sites More sharing options...
BrettF Posted April 4, 2010 Share Posted April 4, 2010 Post your current code. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
G4ORCE Posted April 4, 2010 Author Share Posted April 4, 2010 what the hole code? Link to comment Share on other sites More sharing options...
BrettF Posted April 4, 2010 Share Posted April 4, 2010 (edited) I will not help those who have trouble doing simple tasks and who do not seem willing to try help themselves. If you cannot do something as simple as posting your code, find a new hobby. Cheers, Brett Edited April 4, 2010 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
JohnOne Posted April 4, 2010 Share Posted April 4, 2010 (edited) lol BrettF, you did ask. G4ORCE I think BrettF may hve meant to post the part of your code where you have tried to use loops to seach for your pixel. You said you tried it but it did not work ? The way it works here is that you try to learn how to do something and if you are having problems with your new code, post it and someone may be able to help with what you have done wrong. Its a good method and gets those who try, help, quicker than those who just want someone to write code for them. Edited April 4, 2010 by JohnOne 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...
Tyranlol Posted August 2, 2010 Share Posted August 2, 2010 (edited) All of this is extremely simple, and you could find 100 of tutorials and previous posts if you would just search a little before posting a new topic. Mommy ain't gonna help ya if she knows you aren't learning anything Edited August 2, 2010 by Tyranlol [u]Only by Attempting the Impossible You Can Earn the Remarkable[/u] 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