Sign in to follow this  
Followers 0
Emmhor1

Pixelsearch Multiple colors, &xxxx [Colors] doesn't work

3 posts in this topic

Well here is the script

#include <WinAPI.au3>
;$colors = [0xBA0714, 0xBA0715]

If WinExists(@ScriptName) Then Exit
AutoItWinSetTitle(@ScriptName)
Global $Paused, $counter = 0

HotKeySet("{F3}", "TogglePause")
HotKeySet("{F2}", "Terminate")


Dance()
Func Dance()
While 1
If _WinAPI_GetAsyncKeyState(0x02) = True Then
Local $coord = PixelSearch(950,541,968,523,0xBA0715)
;Local $coord = PixelSearch(950,541,968,523$colors)
If Not @error Then
MouseClick("Left")
Sleep(80)
EndIf
EndIf
WEnd
EndFunc


While 1
$counter +=1
WEnd
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
;ToolTip('Script is "Paused"',0,0, $counter, 1)
WEnd
ToolTip("")
EndFunc

Func Terminate()
Exit 0
EndFunc

the colors variable doesn't work so, does anyone have any idea's.

Share this post


Link to post
Share on other sites



Sorry, I misread your code.

To use an array you must specify an index. In your case there are two indices, 0 and 1...

Local $coord = PixelSearch(950,541,968,523, $colors[0])
Local $coord = PixelSearch(950,541,968,523, $colors[1])

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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