Sign in to follow this  
Followers 0
Axufuris

Resolution question

8 posts in this topic

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 this post


Link to post
Share on other sites



The scaling function is caled math! :P

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 this post


Link to post
Share on other sites

The scaling function is caled math! :P

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 :P Thanks a lot. I will probably be posting an example of my script up soon.

Share this post


Link to post
Share on other sites

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


Regards,Josh

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

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.

[Edit] Ignore that.... I get what you meant.

Edited by Axufuris

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites

Ok good point. Thank you very much!

Share this post


Link to post
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
Sign in to follow this  
Followers 0