trickytroy Posted December 28, 2013 Share Posted December 28, 2013 Hi Folks, I used to use Autoit back in the day and have since stopped writing script. but recently, i've found the need for a small program that would really help me out. So if you have a few minutes, I would appreciate it. I need a script that loops and constantly searches the current open window for this pixel color: 0xABD679. If the color is found, I need the cursor to click it and then a delete key command. Simple as that. I assume that it will be a sort of Ifthen command within a loop. I just don't remember how to do that. I would appreciate the help! Thanks friends! [quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote] Link to comment Share on other sites More sharing options...
Solution ownedya Posted December 29, 2013 Solution Share Posted December 29, 2013 I didn't try it but maybe something like this: While 1 $window = WinGetPos("[ACTIVE]") $coord = PixelSearch($window[0], $window[1], $window[0] + $window[2], $window[1] + $window[2], 0xABD679) If Not @error Then MouseClick("left", $coord[0], $coord[1]) Send("{DEL}") EndIf WEnd Link to comment Share on other sites More sharing options...
trickytroy Posted December 30, 2013 Author Share Posted December 30, 2013 Perfect! Thanks Friend. [quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote] Link to comment Share on other sites More sharing options...
ownedya Posted December 30, 2013 Share Posted December 30, 2013 I just saw that I made a small mistake: While 1 $window = WinGetPos("[ACTIVE]") $coord = PixelSearch($window[0], $window[1], $window[0] + $window[2], $window[1] + $window[3], 0xABD679) If Not @error Then MouseClick("left", $coord[0], $coord[1]) Send("{DEL}") EndIf WEnd 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