Sign in to follow this  
Followers 0
ledanh89

Help me, plz!

5 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Somehow I knew as soon as I saw "plz" in the topic list that it would be game related... :)

Share this post


Link to post
Share on other sites

Dana: Not just the "plz" but the wonderfully descriptive topic that isn't vague at all.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Sr, I were not good at E so that I didn't read forum rules. So, I hope Mod or Admin would close that topic now, It's useless :)

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