Emmhor1 Posted May 30, 2014 Share Posted May 30, 2014 Well here is the script expandcollapse popup#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. Link to comment Share on other sites More sharing options...
JohnOne Posted May 31, 2014 Share Posted May 31, 2014 I'm going out on a limb here, but I think the problem might reside in the fact that your script does not attempt to search multiple colours. Explain further. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted May 31, 2014 Share Posted May 31, 2014 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now