Rajveer Posted July 2, 2008 Share Posted July 2, 2008 I have created script on the resolution of 1280X720 but when I try to run the same script on the system whose resolution is 1024X768 then script won't work properly...please suggest what to do... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 2, 2008 Moderators Share Posted July 2, 2008 I have created script on the resolution of 1280X720 but when I try to run the same script on the system whose resolution is 1024X768 then script won't work properly...please suggest what to do...Well... what would you like us to do exactly? You already know what you did, and you know the difference... seems like you have 2 choices.1. A total re-write adjusting for each type of resolution (or subtraction/addition if you want) there could be.2. A total re-write using Client Coords rather than Screen Coords (The safer bet). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Rajveer Posted July 2, 2008 Author Share Posted July 2, 2008 I have created script on the resolution of 1280X720 but when I try to run the same script on the system whose resolution is 1024X768 then script won't work properly...please suggest what to do...I want some method which made my script able to run on both the resolutions without any re-write of script for different resolution Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 2, 2008 Moderators Share Posted July 2, 2008 I want some method which made my script able to run on both the resolutions without any re-write of script for different resolutionI just gave that to you in "2.", regardless of what you do, you are going to need to do "Math" or New coords (Client ones). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Rajveer Posted July 2, 2008 Author Share Posted July 2, 2008 I just gave that to you in "2.", regardless of what you do, you are going to need to do "Math" or New coords (Client ones).If you don't mind, can you give me a simple example ...plz Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 2, 2008 Moderators Share Posted July 2, 2008 I just gave that to you in "2.", regardless of what you do, you are going to need to do "Math" or New coords (Client ones).You could use this: http://msdn.microsoft.com/en-us/library/ms533179(VS.85).aspx as a dllcall, pass all your current coordinates you are using to it, and mark the changes, then make those changes in your script. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Rajveer Posted July 2, 2008 Author Share Posted July 2, 2008 (edited) You could use this: http://msdn.microsoft.com/en-us/library/ms533179(VS.85).aspx as a dllcall, pass all your current coordinates you are using to it, and mark the changes, then make those changes in your script.can't we do it without changing the co-ordinates.....actually I want a method that automatically adjust the co-ordinates according to the screen resolution.......can we do this in autoIT script Edited July 2, 2008 by Rajveer Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 2, 2008 Moderators Share Posted July 2, 2008 can't we do it without changing the co-ordinates.....actually I want a method that automatically adjust the co-ordinates according to the screen resolution.......can we do this ..?No... not without writing a custom function to do it, and then wrapping all your current coordinates in a function call that will do the math for you... and you can't really get any help, as you've failed to provide anything to help with.Things for future/current use to look at:About Coordinates: http://msdn.microsoft.com/en-us/library/ms229598.aspxThings in autoit to look up when using coordinates:Help file: Index + Opt + PixelCoordMode and MouseCoordModeAutoItInfo.exe: Options + Coord Mode Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Rajveer Posted July 2, 2008 Author Share Posted July 2, 2008 (edited) No... not without writing a custom function to do it, and then wrapping all your current coordinates in a function call that will do the math for you... and you can't really get any help, as you've failed to provide anything to help with.Things for future/current use to look at:About Coordinates: http://msdn.microsoft.com/en-us/library/ms229598.aspxThings in autoit to look up when using coordinates:Help file: Index + Opt + PixelCoordMode and MouseCoordModeAutoItInfo.exe: Options + Coord ModeThe below are lines from my script which is written according to the 1280X720 Resolution but pls tell me how can I run the same below lines without changing the coordinates manually on the screen resolution 1024X768 MouseClick("Left",237,503,1) Sleep ($const2) MouseClick("Left",196,528,1) Sleep ($const2) MouseClick("Right",300,500,1) ;To Save MouseClick("Left",330,564,1) ;Saved Sleep ($const3) MouseClick("Left",257,278,1) Edited July 2, 2008 by Rajveer Link to comment Share on other sites More sharing options...
nobbe Posted July 2, 2008 Share Posted July 2, 2008 using mouseclicks with "absolute" coordinates only work for the specific resolutions that you have setup, other than that you will have to CALCULATE according to the screen resolution where to click Link to comment Share on other sites More sharing options...
Rajveer Posted July 2, 2008 Author Share Posted July 2, 2008 using mouseclicks with "absolute" coordinates only work for the specific resolutions that you have setup, other than that you will have to CALCULATE according to the screen resolution where to clickThat I know very well.....I want a custom function that do it automatically rather than calculating manually Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 2, 2008 Moderators Share Posted July 2, 2008 That I know very well.....I want a custom function that do it automatically rather than calculating manuallyIt's sad... I've told you many ways to do it... You just seem to lazy to put any thought or effort into doing it.The easiest for you would be math... Look at @DesktopWidth and @DesktopHeight ... you should be able to get what you want with some addition and or subtraction from what you've already used. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
PartyPooper Posted July 2, 2008 Share Posted July 2, 2008 I have created script on the resolution of 1280X720 but when I try to run the same script on the system whose resolution is 1024X768 then script won't work properly...please suggest what to do...Would this be of any use to you - ChangeResolution (assuming of course you are happy changing the 1024x768 system)? Link to comment Share on other sites More sharing options...
Kiti Posted July 2, 2008 Share Posted July 2, 2008 You know that 1024 is 80% of 1280. Keeping the same proportions, calculate 80% of your x-axis coords. Then do the same thing for the vertical. I don't say it works 100% sure, and this only my personal thought about the solution. Try it and see if it works. Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Rajveer Posted July 3, 2008 Author Share Posted July 3, 2008 You know that 1024 is 80% of 1280. Keeping the same proportions, calculate 80% of your x-axis coords. Then do the same thing for the vertical. I don't say it works 100% sure, and this only my personal thought about the solution. Try it and see if it works.That trick is not at all working....please suggest some other way Link to comment Share on other sites More sharing options...
Kiti Posted July 3, 2008 Share Posted July 3, 2008 The below are lines from my script which is written according to the 1280X720 Resolution but pls tell me how can I run the same below lines without changing the coordinates manually on the screen resolution 1024X768 MouseClick("Left",237,503,1) Sleep ($const2) MouseClick("Left",196,528,1) Sleep ($const2) MouseClick("Right",300,500,1) ;To Save MouseClick("Left",330,564,1) ;Saved Sleep ($const3) MouseClick("Left",257,278,1)Just take that 5 damn coordinates again !!! muttley Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
nobbe Posted July 3, 2008 Share Posted July 3, 2008 its a useless topic now - we already told this guy 5 times how to solve his problem but he refuses to take advice - so its useless.. 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