city Posted November 17, 2006 Share Posted November 17, 2006 My script : $var=PixelSearch(0,0,024,786,1677215) MsgBox(0,"",$var&" "&$var[0]&" "&$var[0]) If @error Then $again=0 Else MouseClick($x,$y,2,0) $again=1 EndIf Problem : >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\user\Desktop\test.au3" C:\Documents and Settings\user\Desktop\test.au3 (2) : ==> Subscript used with non-Array variable.: MsgBox(0,"",$var&" "&$var[1]&" "&$var[0]) MsgBox(0,"",$var&" "&$var^ ERROR >Exit code: 0 Time: 4.753 I have some problem (above), tell me why? Isn't some AutoIt3-files broken or lost? Link to comment Share on other sites More sharing options...
Valuater Posted November 17, 2006 Share Posted November 17, 2006 per help ; Find a pure red pixel in the range 0,0-20,300 $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) If Not @error Then MsgBox(0, "X and Y are:", $coord[0]& "," & $coord[1]) EndIf this $coord is the same idea as your $var if it is NOT @error then there is an array ( dont use $var only... you need to use $var[#] ( where # = number )) 8) Link to comment Share on other sites More sharing options...
Developers Jos Posted November 17, 2006 Developers Share Posted November 17, 2006 My script :Problem :I have some problem (above), tell me why? Isn't some AutoIt3-files broken or lost?Please post in Support first when you are not sure if its a bug...You need to test the @error to see if PixelSearch() found the requested pixel..Moved to Support SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
city Posted November 17, 2006 Author Share Posted November 17, 2006 $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) MsgBox(0, "X and Y are:", $coord[0]& "," & $coord[1]) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\user\Desktop\New AutoIt v3 Script (3).au3" C:\Documents and Settings\user\Desktop\New AutoIt v3 Script (3).au3 (14) : ==> Subscript used with non-Array variable.: MsgBox(0, "X and Y are:", $coord[0]& "," & $coord[1]) MsgBox(0, "X and Y are:", $coord^ ERROR >Exit code: 0 Time: 0.339 It is same while i run your script . Link to comment Share on other sites More sharing options...
Developers Jos Posted November 17, 2006 Developers Share Posted November 17, 2006 It is same while i run your script .Have a look at your script again... lets see if you can figure it out ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Valuater Posted November 17, 2006 Share Posted November 17, 2006 Again... there is only an array created in NOT @ERROR $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) ; REMOVED - MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf 8) 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