Axufuris Posted August 12, 2008 Share Posted August 12, 2008 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. Link to comment Share on other sites More sharing options...
JFee Posted August 12, 2008 Share Posted August 12, 2008 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 Link to comment Share on other sites More sharing options...
Axufuris Posted August 12, 2008 Author Share Posted August 12, 2008 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 = .595500 / 1050 = .476Then, 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 valuelol 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. Link to comment Share on other sites More sharing options...
JFee Posted August 12, 2008 Share Posted August 12, 2008 If you are not hardcoding the points I would make a function to do the math Regards,Josh Link to comment Share on other sites More sharing options...
Axufuris Posted August 12, 2008 Author Share Posted August 12, 2008 (edited) 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. [Edit] Ignore that.... I get what you meant. Edited August 12, 2008 by Axufuris Link to comment Share on other sites More sharing options...
Axufuris Posted August 12, 2008 Author Share Posted August 12, 2008 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? Link to comment Share on other sites More sharing options...
JFee Posted August 12, 2008 Share Posted August 12, 2008 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 Link to comment Share on other sites More sharing options...
Axufuris Posted August 12, 2008 Author Share Posted August 12, 2008 Ok good point. Thank you very much! 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