Jump to content

Help me, plz!


ledanh89
 Share

Recommended Posts

I having a problems and need for ur help. I want: when the game show this picture (My attach file), AutoIt will do a MouseClick. And this is my code:

Dim $a= PixelGetColor (x1,y1)
Dim $b= PixelGetColor (x2,y2)
Dim $c= PixelGetColor (x3,y3)
const $a1=0xDDCB9C
const $b1=0x612E20
const $c1=0xA5211F
Do
If $a=$a1 And $b=$b1 And $c=$c1 Then
Sleep (0)
MouseClick ("", 341,535,1,100)
EndIf
Until $a=$a1 And $b=$b1 And $c=$c1

x1,y1: postion of a point of the picture on the screen

Althought there's have no error, it's still not working . I think the problems maybe that: this picture appeared in only 0,01 second, and the Loop statement's frequence of Autoit is't fast enough

What should I do now? If any ways else for Autoit does a Mouseclick when this picture appear, plz show details to me. Sorry about my English, and my code, I'm bad at both

untitled.bmp

Link to comment
Share on other sites

Welcome to AutoIt and the forum!

First thing a new user needs to do is read the forum rules.

You will realize that game automation is a big NO here :)

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...