wesley57 Posted May 17, 2005 Share Posted May 17, 2005 Lets say for example I have this mouse click command: MouseClick("right", 295, 353, 1, 0) My question: Is there a way to give it a variable coordinate amount, so it can randomy click within, perhaps, plus or minus 4 pixels of the given xy coordinates? I was hoping there was some sort of way to do this, any help would be appreciated, thanks! Link to comment Share on other sites More sharing options...
Blue_Drache Posted May 17, 2005 Share Posted May 17, 2005 (edited) Random --------------------------------------------------------------------------------Generates a pseudo-random float-type number.Random ( [Min [, Max [, Flag]]] )ParametersMin [optional] The smallest number to be generated. The default is 0. Max [optional] The largest number to be generated. The default is 1. Flag [optional] If this is set to 1 then an integer result will be returned. Default is a floating point number. Return ValueSuccess: Returns a pseudo-random number between Min and Max. Failure: Returns 0 and sets @error flag: 0 success. 1 Bad parameters.Int --------------------------------------------------------------------------------Returns the integer (whole number) representation of an expression.Int ( expression )Parametersexpression An expression to convert into an integer. Return ValueReturns an integer.$startx = 295 $starty = 353 $x = Int(Random($startx - 4, $startx + 4)) $y = Int(Random($starty - 4, $starty + 4)) MouseClick("right", $x, $y, 1, 0) Edited May 17, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
wesley57 Posted May 17, 2005 Author Share Posted May 17, 2005 Alirght, thats just what i needed! Thanks! 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