Sign in to follow this  
Followers 0
bevardis

Clicking on picture?

9 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



#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



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

I need the program to find the identic cookie on the screen and click it :?

Share this post


Link to post
Share on other sites

Pixelchecksum

It's not quite clear for me how to use it :D

Any live examples?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

:D Nice way to put many links :D

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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