Jump to content

Recommended Posts

Posted (edited)

For example I have a button on a game

Posted Image

How would I click any place of it in autoIt?

Edit: I'm not using auto it directly, I'm using it thru python.

Edited by bevardis
Posted

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 633, 447, 193, 125)
$Pic1 = GUICtrlCreatePic("F:\AutoIt\cookie_chocchip.gif", 224, 88, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Pic1
            MsgBox(0,"message", "You clicked the damned cookie")
    EndSwitch
WEnd


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Posted

I can't use pixel sum thing because I don't know coordinates.

I have a button.bmp - a picture of how a button looks like, and I need autoIT to find the button on screen and click it.

Now, I need to click not on just button that I bet can be clicked in other ways.

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
×
×
  • Create New...