Meep Posted June 3, 2005 Posted June 3, 2005 It's me again, Hey I'am having problems with pixelgetcolor. I'am trying to get my script to search for a 'White paint bucket', Everything goes well and the pixelgetcolor works flawlessly. But when it detects the paint bucket and tells the mouse to move to the cords, it gave me this error: Line 18 (file blah blah) MouseClick("left", $coord[0], $coord[1], 5, 1) MouseClick("left", ^ERROR Error: Variable used eithout being declared. Can anyone teach me how to declare that variable? to make my mouse move to it and prease the left mouse button. Thanks a Bunch!!
herewasplato Posted June 3, 2005 Posted June 3, 2005 ...show your line of code where you used PixelGetColor... [size="1"][font="Arial"].[u].[/u][/font][/size]
Meep Posted June 3, 2005 Author Posted June 3, 2005 WinActive("Counter-Strike Source") While 1 If PixelGetColor(518, 410) = 16777215 Then MouseClick("left", $coord[0], $coord[1], 5, 1) sleep(1) EndIf Wend
buzz44 Posted June 3, 2005 Posted June 3, 2005 Have you noticed that the variable $Coord does not exist? You need to assign it to the PixelGetColor function like below... WinActive("Counter-Strike Source") While 1 $Coord = PixelGetColor(518, 410) If $Coord = 16777215 Then MouseClick("Left", $Coord[0], $Coord[1], 5, 1) Sleep(1) EndIf Wend qq
herewasplato Posted June 3, 2005 Posted June 3, 2005 or you might want PixelSearch see this posthttp://www.autoitscript.com/forum/index.ph...817entry81817 [size="1"][font="Arial"].[u].[/u][/font][/size]
Meep Posted June 3, 2005 Author Posted June 3, 2005 Now I got this error: Line 19 (file blah blah) MouseClick("Left", $Coord[0], $Coord[1], 5, 1) MouseClick("Left", $Coord^ERROR Error: Subscript used with non-Array variable.
herewasplato Posted June 3, 2005 Posted June 3, 2005 (edited) is the white paint bucket always in the same place?or do you really have to search for it like you said in your first post?edit: I see via your profile that you are off reading the link that I posted. You should also visit your rose online post... you have answershttp://www.autoitscript.com/forum/index.ph...t=0entry83356 Edited June 3, 2005 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
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