Jace Posted March 9, 2007 Posted March 9, 2007 Okay so mouseclick apparently can't handle arrays or variables: $temp1 = "619 , 755" $temp = $Positions[13][1] MsgBox(64, "Test", $temp) MouseClick("right" , $temp1 , 1) MouseClick("right" , $temp , 1) The array contains 619 , 755 and so does the temp1 variable... What's the issue? The script just rolls the mouse to the top mid of the screen and rclicks. -Jace
Helge Posted March 9, 2007 Posted March 9, 2007 (edited) $temp1 is just a string with a comma in it, and is treated as a single parameter when used in a function-call. MouseClick("right" , "619 , 755", 1) $temp is an array, but I can't find anywhere in the helpfile where it states that MouseClick can be passed an array. The issue isn't on AutoIt's part but on yours. Edited March 9, 2007 by Helge
Jace Posted March 9, 2007 Author Posted March 9, 2007 $temp1 is just a string with a comma in it, and is treated as a single parameter when used in a function-call. MouseClick("right" , "619 , 755", 1) $temp is an array, but I can't find anywhere in the helpfile where it states that MouseClick can be passed an array. The issue isn't on AutoIt's part but on yours. So there is no way to read mouse coordinates from an INI file and pass them to MouseClick?
Helge Posted March 9, 2007 Posted March 9, 2007 (edited) Of course there is. If you're having it in the format as shown in $temp1 you can just INIRead it and then StringSplit it. $coords = INIRead(..) $coords = StringSplit($coords, ",") ; error-checking... MouseClick("right" , $coords[1], $coords[2], 1) Something like that.. Edited March 9, 2007 by Helge
Jace Posted March 9, 2007 Author Posted March 9, 2007 Worked like a charm THANK YOU so MUCH! I really can't explain to you how much trouble you saved me! I might actually pass Comp IV in my High School after all! -Jace
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