Jump to content

How to click coordinates based on %'s


Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...