autoitquestion Posted April 22, 2011 Share Posted April 22, 2011 Hi, Is there any way to overcome on different resolution screen while using MouseClick command? Thanks in advance! Noa :-) Link to comment Share on other sites More sharing options...
bwochinski Posted April 22, 2011 Share Posted April 22, 2011 Trying to deal with MouseClick() on different resolutions is no fun, and I'd only consider it as a last resort. If you can use ControlClick() that would be a lot easier and more reliable. It depends on what program you're trying to interact with though. Link to comment Share on other sites More sharing options...
autoitquestion Posted April 22, 2011 Author Share Posted April 22, 2011 yes- I know ControlClick, but from unknown reason it's did not work.. So.. Link to comment Share on other sites More sharing options...
bwochinski Posted April 22, 2011 Share Posted April 22, 2011 (edited) So.... what program and control is it that you're trying to click on? If you really just want to figure out MouseClick(), it's tricky. When program windows are resized or displayed in different resolutions the positioning of the controls doesn't always scale linearly, depending on how they're aligned. To start, you need to find out how the X & Y positioning changes, through some testing, on different resolutions. Then figure out some kind of forumula that can match those changes, as well as (hopefully) correctly anticipates the control positions on resolutions you haven't tested. Mainly, expect some trial and error. Edited April 22, 2011 by bwochinski Link to comment Share on other sites More sharing options...
autoitquestion Posted April 22, 2011 Author Share Posted April 22, 2011 Hi, Thanks for your help! I have only 2 different resolutions for now On one coordinates are: 811, 386, while on the 2nd are: 1098, 455 let's assume the difference is liniar.. so how to build the formnula? what I need doing now with this formula? Thanks! Noa :-) Link to comment Share on other sites More sharing options...
bwochinski Posted April 22, 2011 Share Posted April 22, 2011 What are the screen resolutions that each of those coordinates are on? It's the relationship between the screen resolution and the control coordinates that is important. Link to comment Share on other sites More sharing options...
autoitquestion Posted April 22, 2011 Author Share Posted April 22, 2011 How can I know screen resolution? Link to comment Share on other sites More sharing options...
autoitquestion Posted April 22, 2011 Author Share Posted April 22, 2011 Okay-found it.. On one coordinates are: 811, 386 and screen resolution is: 1280 by 960 pixels On 2nd are: 1098, 455 and screen resolution is: 1920 by 1080 pixels Thanks a lot! Link to comment Share on other sites More sharing options...
autoitquestion Posted April 22, 2011 Author Share Posted April 22, 2011 all okay now.. thanks all 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