washer Posted July 24, 2008 Share Posted July 24, 2008 (edited) Hey I'm new here and i have very little understanding of programming. I had a search through the forums and couldn't find what i was looking for so i thought i would attempt to post a thread. What i am after is a script/program that will automatically click a button which appears on the screen at random intervals. If there is one on this site and i have missed it I'm sorry, but any help with links or names to search for i will be thankful. This Button has a name but never in the same position. Cheers Edited July 24, 2008 by washer Link to comment Share on other sites More sharing options...
d4rk Posted July 24, 2008 Share Posted July 24, 2008 (edited) PixelSearch() MouseClick() Edited July 24, 2008 by d4rk [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
Backnor Posted July 24, 2008 Share Posted July 24, 2008 (edited) open up autoit info tool and find the x and y cord (top left of the box u want to search) then the x and y of the bottom right of the box u want to search. first x and y cords use them in pixel search(x, y, now the second set use in the next set of cords for pixel search followed by the hex# for the color u are trying to find. Last thing is the color variation u want to use (it will find the hex color plus or minus, thus called shade variation) use $color = PixelSearch(x, y, x1, y1, 0x000000, 5) While 1 $color = PixelSearch(x, y, x1, y1, 0x000000, 5) If IsArray($pixel) = 1 Then; If Pixel has been found MouseClick('left', $pixel[0], $pixel[1], 1, 0); Click on the pixel EndIf WEnd hope this helps a little Edited July 24, 2008 by Backnor Link to comment Share on other sites More sharing options...
cal Posted July 24, 2008 Share Posted July 24, 2008 (edited) That seems like a lot of work. Its very likely that this "Button" is part of an error window that pops up. Use the info tool to find the name of the window. It could be as simple as sending an enter whenever the window pops up. or send a ControlClick directly to the button when the window shows. Unless its part of a Game or something else that has direct control of the screen then I would avoid using the pixel functions. I think PixelChecksum is more useful. And I admit I've used it myself when I could not figure out a better way of detecting something. Edited July 24, 2008 by cal Link to comment Share on other sites More sharing options...
washer Posted July 25, 2008 Author Share Posted July 25, 2008 thanks i got it working but im wondering if theres a way to double click i added the line twice doesnt seem to help any ideas? Link to comment Share on other sites More sharing options...
muzle6074 Posted July 25, 2008 Share Posted July 25, 2008 thanks i got it working but im wondering if theres a way to double click i added the line twice doesnt seem to help any ideas? MouseClick ("Left", x, y, 2, 0) the 2 is how many clicks. 2 will click twice ofc MouseClick ( "button" [, x, y [, clicks [, speed ]]] ) 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