_Kurt Posted November 20, 2006 Share Posted November 20, 2006 (edited) Hey guys,Is it possible to see if (example.gif) is active at ($X, $Y) or something similar? PixelCheckSum is not what i need since the program just needs to see if the pic is there, rather than to check if something changed.(sorry for no example script)Thanks,Kurt** EDIT ** 100 POSTS WOOHOO Edited November 20, 2006 by _Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 20, 2006 Moderators Share Posted November 20, 2006 Is this in your own app? ControlCommand + IsVisible or IsEnabled Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 20, 2006 Share Posted November 20, 2006 Or if applicable, perhaps IsObj? IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
_Kurt Posted November 20, 2006 Author Share Posted November 20, 2006 Well, to elaborate on my problem, say you're playing an internet game and a big happy face appears if (for example) you click. If I take a screenshot, cut out the happy face and save it as a .gif in the scripts directory, would I be able to see if that happy face is active (when playing the game). Example: $pic = "picture.gif" If $pic = (active) Then Msgbox(0,"","Happy Face Appeared!") EndIf Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
_Kurt Posted November 20, 2006 Author Share Posted November 20, 2006 So I was wondering, if it is infact possible, how could I make this work? And if it isn't possible, what other functions could I use? Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
jvanegmond Posted November 20, 2006 Share Posted November 20, 2006 (edited) You want to get a PixelCheckSum of a certain region in advance and code the return value in your script. Make your AutoIt script poll constantly to see wether the current PixelCheckSum is equal to that of the earlier captured checksum that showed the smiley face.. When the checksums are equal, the test has passed. Don't argue with me over this, this is the most reliable and easiest way to do this. Edited November 20, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
_Kurt Posted November 20, 2006 Author Share Posted November 20, 2006 The problem is, the "screen" is always moving, if it detects a change in $X and $Y, it will do my function. The happy face may pop up at any time. Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 20, 2006 Moderators Share Posted November 20, 2006 The problem is, the "screen" is always moving, if it detects a change in $X and $Y, it will do my function. The happy face may pop up at any time.The answer as stated is PixelCheckSum()... or if the picture has a control value to check if it's enabled or disabled, if it's a browser based game then look at the getcollection (I think that's the name) of the IE* functions... other than that, you have 3 choices, the first being the hardest because now you have to get a multitude of sums to make it work.What game is it... maybe someone has already done it? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
_Kurt Posted November 21, 2006 Author Share Posted November 21, 2006 Game: Diablo 2 Purpose: To click on the "accept box" as soon as the other person has checked the accept box. Basically for the fun game known as "green box" where the other person flashes the accept box on and off quickly, than it's your turn to do the same. Awaiting Diablo III.. 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