Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 21:44

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



need help in autoit

Discussion on need help in autoit within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 50
Join Date: May 2009
Posts: 26
Received Thanks: 9
need help in autoit

Hey
Im a newb in autoit, I dont know what comand i need, so i hope you guys help me..

Soo ive got my mouse coordinants, I want to mousedown on them and mouseup again only if a pixel colour appears. So it would need to wait for this colour.
Sounds pretty easy but i dont get it
sanjok082 is offline  
Old 04/09/2014, 14:37   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Code:
MouseMove($x, $y)
MouseDown("left")
While Not (Hex(PixelGetColor($x2, $y2)) = 0x123456)
Sleep(100)
WEnd
MouseUp("left")
Replace the variables and the color with yours.
alpines is offline  
Thanks
2 Users
Old 04/10/2014, 18:12   #3
 
elite*gold: 50
Join Date: May 2009
Posts: 26
Received Thanks: 9
Thanks!
Now i´ve got an other problem.
I want now to exitloop if it finds a color, but if there is the second color, (0xEEE2C7), on 86, 631 it should exitloop and click 2 more times instead.What am I doing wrong?
Code:
While 1
Sleep(3800)
MouseClick("left", 1208, 549, 2)
$Variable = PixelSearch(0, 0, 51, 80,0x5D5D60)
$Variable2 = PixelSearch(0, 0, 86, 631,0xEEE2C7)
if IsArray($Variable) = true Then
ExitLoop
Elseif IsArray($Variable2) = true Then
   Exitloop
   Sleep(4000)
   MouseClick("left", 86, 631)
Sleep(500)
MouseClick("left", 244, 562, 2)
EndIf
EndIf
WEnd
sanjok082 is offline  
Old 04/10/2014, 19:38   #4
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Switch the MouseClick("left", 86, 631) with the ExitLoop, because you exit the loop before you run the MouseClick command.
alpines is offline  
Thanks
1 User
Reply




All times are GMT +1. The time now is 21:44.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.