Register for your free account! | Forgot your password?

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

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

Advertisement



Problem with colors

Discussion on Problem with colors within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2014
Posts: 1
Received Thanks: 0
Problem with colors

Hi, I would like to create a program that would do something like this:

Check color in x-212 y-157 and if color = white click here(x,y), but if not - click (x,y) and check again color in x-212 y-157, check color untill = white

I've got something like this but it doesn't work

Code:
$iTargetColor = 0xFFFFFF
  $color = PixelGetColor(122, 104)
    If $iTargetColor<>$color Then
			MouseClick("primary", 686, 583)
			ExitLoop 2
	Else
	   MouseClick("primary", 755, 618)
	EndIf
silversky7 is offline  
Old 01/01/2016, 16:21   #2


 
Moneypulation's Avatar
 
elite*gold: 138
Join Date: Apr 2012
Posts: 3,495
Received Thanks: 1,769
I assume you confused then and else. Also why are you using Exitloop if there is no loop in your code? Or isn't that the whole code?

PHP Code:
$iTargetColor 0xFFFFFF

While True
    $color 
PixelGetColor(122104)
    If (
$iTargetColor<>$colorThen
        MouseClick
("primary"755618)
    Else
        
MouseClick("primary"686583)
        
ConsoleWrite("white color found")
        
ExitLoop
    
EndIf
WEnd 
Make sure you bind a hotkey with a function that exits your script. MouseClicks in a loop can end badly :s
Moneypulation is offline  
Reply


Similar Threads Similar Threads
[CSS-COLORS.DE] Ihr sucht CSS Colors ?
12/22/2011 - Counter-Strike - 2 Replies
Hey0 ihr seit Moviemaker und sucht oder wollt uns eure CSS Colors geben ? Dann besucht www.CSS-COLOR.de Mfg, CSS Colors Team :)
[GM]All Colors
08/30/2011 - S4 League Hacks, Bots, Cheats & Exploits - 18 Replies
Colors {F-2002_20}{CB-128,0,255,255}==mauve {F-2002_20}{CB-255,255,0,255}===Yellow {F-2002_20}{CB-255,255,0,734}===yellow flash {F-2002_20}{CB-255,0,0,255}===red {F-2002_20}{CB-255,0,0,999}===red flash {F-2002_20}{CB-255,0,255}===Magenta=pinki {F-2002_20}{CB-255,0,999}===pinki flash
GM COLORS
08/30/2011 - S4 League - 6 Replies
HI all , can anyone help me to get colors of the GM's chat plz ? post there and a little thx :P ? PLZ HELP ME
colors
01/05/2010 - S4 League - 0 Replies
I wonder like change the colors of the weapons, but that other players be are able to see.
Colors
01/05/2010 - S4 League - 1 Replies
I wonder like change the colors of the weapons, but that other players be are able to see.



All times are GMT +2. The time now is 21:05.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.