Sign in to follow this  
Followers 0
_Kurt

If (pic) = active Then

9 posts in this topic

#1 ·  Posted (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 by _Kurt

Awaiting Diablo III..

Share this post


Link to post
Share on other sites



Is this in your own app?

ControlCommand + IsVisible or IsEnabled


[center]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.[/center]

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by Manadar

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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?


[center]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.[/center]

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0