# Resolution question

## Recommended Posts

I am building a mining macro for Eve. I was wondering if there was some kind of scaling function for different resolutions. This way i would not have to go off and find each value for the different resolutions.

##### Share on other sites

The scaling function is caled math!

What you do is you find the percentage values of the points. Let's say you have a 1680 x 1050 resolution, and you want to press the point 1000, 500.

1000 / 1680 = .595

500 / 1050 = .476

Then, whenever you go to use a command that looks for a point as a parameter, use

.595 * @DesktopWidth as the X value and

.476 * @DesktopHeight as the Y value

Regards,Josh

##### Share on other sites

The scaling function is caled math!

What you do is you find the percentage values of the points. Let's say you have a 1680 x 1050 resolution, and you want to press the point 1000, 500.

1000 / 1680 = .595

500 / 1050 = .476

Then, whenever you go to use a command that looks for a point as a parameter, use

.595 * @DesktopWidth as the X value and

.476 * @DesktopHeight as the Y value

lol Wow can't believe i didn't think of that. Now the tricky part is rewriting my program to be able to do that Thanks a lot. I will probably be posting an example of my script up soon.

##### Share on other sites

If you are not hardcoding the points I would make a function to do the math

Regards,Josh

##### Share on other sites

If you are not hardcoding the points I would make a function to do the math

I'm going to have to hardcode the points. I already have them hardcoded but its using a resolution of 1680 X 1050. So i will have to do the math and then hardcode them back like that then translate them out when i need them.

 Ignore that.... I get what you meant.

Edited by Axufuris

##### Share on other sites

I do have one question. Will it work if i round off the numbers? For instance if i had my resolution of 1680 x 1050 and i have a point at x= 480 and y = 15. Well if i divided those out should i hardcode them as x = 0.2857142857142857 or just round it off to the nearest 1000th? And also say i was converting that over to a 800 x 600 resolution.... do i need to round that to an integer or can i leave it as 2.12?

##### Share on other sites

I would have AutoIt do the math. That way all of the rounding will be as accurate as possible. You will only be off by 1 or 2 pixels if it is off at all, but that really doesn't make a difference.

Regards,Josh

##### Share on other sites

Ok good point. Thank you very much!

## Create an account

Register a new account

×

• Wiki

• Back

• Git