Neversleep Posted May 18, 2012 Share Posted May 18, 2012 Hi, I have a simple script that works perfectly, but I would like to put another piece of script that, if a specific point becomes orange (let's say) , the script that I have now pauses and in the meantime autoit should: 1) Click in the coords I give him 2) Waits until a specific pixel becomes white 3) Presses "J" 4) Presses "J" again (after 10 seconds) The script that I have now should remain paused until the pixel is NOT orange Until now I have made something, but then I erased it because it did not work I've thought something like: If ;don't know how to tell him "If coord is orange" mousemove (x, y, 1) mouseclick (x, y, 1) sleep Until ; don't know how to tell him "Until Pixel at coords X1, Y1 becomes white" ""press J"" sleep (10000) ""press J"" sleep (10000) ;and from now on I don't have idea how to proceed... Link to comment Share on other sites More sharing options...
water Posted May 18, 2012 Share Posted May 18, 2012 Can you please tell us what kind of application you try to automate? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Neversleep Posted May 18, 2012 Author Share Posted May 18, 2012 I've read the rules, it's not a bot if you're thinking about it It has to do with skype or msn: practically when someone tells you something the icon (don't know how to say it in English) becomes orange and blinks Link to comment Share on other sites More sharing options...
Neversleep Posted May 19, 2012 Author Share Posted May 19, 2012 Nothing ? Link to comment Share on other sites More sharing options...
Venix Posted May 20, 2012 Share Posted May 20, 2012 (edited) Something along the lines of this might help you, if you receive errors let me know. In the PixelGetColor statements you will need to change the number values to the hexadecimal colour value that you want to use to get this value you can use something like this. $Colour = PixelGetColor(0, 0) MsgBox(64, "Colour", $Colour) ClipPut($Colour) If PixelGetColor(0, 0) = "0000000" Then MouseMove(100, 100, 1) ; This line is actually pointless because mouseclick deals with this but you asked for it. MouseClick("Left", 100, 100, 1, 1) Do Until PixelGetColor(100, 100) = "FFFFFFF" ; I am using a do until statement to pause the script however im sure there are better ways to do this. Send("J") Sleep(10000) Send("J") EndIf Edited May 20, 2012 by Venix 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