meowbits Posted May 6, 2009 Posted May 6, 2009 Have it setup so the user defines the game dimensions. Those are set as $left, $top, $right, $bottom. I have the coordinates of where I want to click in a percentage based off of the game dimensions that the user picked. 77.63%, 91.37% How do I set it up so that it will click at that coordinate? - and effectively click in the same spot regardless of computer resolution/size Your help is much appreciated!
weaponx Posted May 6, 2009 Posted May 6, 2009 Simple math here... @DesktopWidth * (77.63/100) @DesktopHeight * (91.37/100)
meowbits Posted May 6, 2009 Author Posted May 6, 2009 Simple math here...@DesktopWidth * (77.63/100)@DesktopHeight * (91.37/100)Desktop isn't what I need.When it starts, you're prompted to click the outside edges of the browsergame screen.So the screen could be moved to the top left, or right.. ect.I need a way to make it so the % is based off of the coordinates that the user picked.
bluebearr Posted May 6, 2009 Posted May 6, 2009 Maybe this? $ClickX = Round(($right - $left)*(77.63/100), 0) + $left $ClickY = Round(($bottom - $top)*(91.37/100), 0) + $top BlueBearrOddly enough, this is what I do for fun.
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