Shdshdw Posted November 5, 2012 Share Posted November 5, 2012 Hello, I wanted to make 2 pieces of code but im completely new to scripting. Maybe when there is an example code I can try to understand it and apply it myself later on. My first concept is: Creating a loop which presses a certain key once a while and also presses once on a certain pixel when it had changed to a specified colour (and click again when it changed back to that colour) My second one is: A loop to press a certain button once a while untill a certain pattern of pixels appear in a specified area on the screen in that case the loop should be stopped. I hope someone is able to make me an example scirpt on one or both of these concepts so I am able to use that technique on more codes. Thanks in advance Link to comment Share on other sites More sharing options...
water Posted November 5, 2012 Share Posted November 5, 2012 Welcome to AutoIt and the forum! Could you please explain which program you try to automate? Maybe there is an easier solution than checking pixels. 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...
Shdshdw Posted November 5, 2012 Author Share Posted November 5, 2012 (edited) Thanks, Im trying to automate a part of a game. Theres is a button. When you press it a random number will appear 1-20, it should be clicking untill it detects a number higher than for example 14. The problem is it does not seem to have any other detectable output other than the visual pixels. I have already tried to search for these outputs with software like cheatengine. If it is too hard to check for pixels, just don't waste your time on it, I wouldn't understand a too complex script anyways. Maybe it is easier to do the first concept? For the first concept maybe it is possible to be worked out like this: Press ESCP wait X seconds If pixel (x,y) is colour FFFFFF (white) click pixel (x,y) (for example pixel(854,661)) If not FFFFFF continue without clicking wait X seconds --------------------------------And repeat again (loop)---------------- Press ESCP wait X seconds If pixel (x,y) is colour FFFFFF (white) click pixel (x,y) If not FFFFFF continue without clicking wait X seconds Is that a possiblility or is it just not scriptable? Edited November 5, 2012 by Shdshdw Link to comment Share on other sites More sharing options...
water Posted November 5, 2012 Share Posted November 5, 2012 That's what I feared. You need to read the forum rules first.Then you will understand that game automation isn't allowed here and you will not get any help on this issue. 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...
Shdshdw Posted November 5, 2012 Author Share Posted November 5, 2012 Oh, I didn't know that. I will quit this subject than, sorry for bothering you, Link to comment Share on other sites More sharing options...
Recommended Posts