Jump to content
Sign in to follow this  
autoitquestion

different resolution screen while using MouseClick command

Recommended Posts

autoitquestion

Hi,

Is there any way to overcome on different resolution screen while using MouseClick command?

Thanks in advance!

Noa :-)

Share this post


Link to post
Share on other sites
bwochinski

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.

Share this post


Link to post
Share on other sites
autoitquestion

yes- I know ControlClick, but from unknown reason it's did not work..

So..

Share this post


Link to post
Share on other sites
bwochinski

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 by bwochinski

Share this post


Link to post
Share on other sites
autoitquestion

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 :-)

Share this post


Link to post
Share on other sites
bwochinski

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.

Share this post


Link to post
Share on other sites
autoitquestion

How can I know screen resolution?

Share this post


Link to post
Share on other sites
autoitquestion

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!

Share this post


Link to post
Share on other sites
autoitquestion

all okay now..

thanks all

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.