Berend Jan Posted April 26, 2005 Share Posted April 26, 2005 hi guys, I was making a script and I was wondering if there is any way to "recall" the coords where I need them. I was thinking about this (which doesn't work of course): $Locvar= 100, 200 mouseclick ("left", $Locvar, 2) Maybe you guys have a way to make this possible? Berend Jan Link to comment Share on other sites More sharing options...
nobby Posted April 27, 2005 Share Posted April 27, 2005 This works... $Locvar= 100 $Locvar2= 200 mouseclick ("left", $Locvar, $Locvar2, 2) CheersNobby Link to comment Share on other sites More sharing options...
buzz44 Posted April 27, 2005 Share Posted April 27, 2005 $Locvar= "100, 200" MouseClick ("left", $Locvar, 2) You just enclose the $Locvar in quotation marks. qq Link to comment Share on other sites More sharing options...
CyberSlug Posted April 27, 2005 Share Posted April 27, 2005 $Locvar= "100, 200" MouseClick ("left", $Locvar, 2)You just enclose the $Locvar in quotation marks.<{POST_SNAPBACK}> This is incorrectYou cannot combine two parameters of a function into one variable! You must specify a separate variable for each parameter.If you wanted to create your own function that takes a single string (text) paramter that contains two numbers separated by a comma, you can:$Locvar= "100,200" _MyMouseClick ("left", $Locvar, 2) Func _MyMouseClick($button, $point, $clicks = 1, $speed = 10) Local $coords = StringSplit($point, ",") If UBound($coords) = 3 Then MouseClick($button, Number($coords[1]), Number($coords[2]), $clicks, $speed) EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
buzz44 Posted April 27, 2005 Share Posted April 27, 2005 (edited) I tested it and it worked .Edit: Bug? Edited April 27, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
Berend Jan Posted April 27, 2005 Author Share Posted April 27, 2005 $Locvar= "100, 200" MouseClick ("left", $Locvar, 2)You just enclose the $Locvar in quotation marks.<{POST_SNAPBACK}>this does work for me. just tested it. thanks you guys. you have been a great help. 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