Sign in to follow this  
Followers 0
Maxel

Defining the Start Point for Clicking

7 posts in this topic

Hello,

I was wondering if it is possible to define the Start Point from which the Pixels get counted... The Problem is i got 2 Screens and want to execute the Script on the Second Screen with its native Resolution... so i thought maybe there is a function where i can set the 0 Point to the right side and dont have to change EVERY cord ( which are quite some ). Thx in Advance ( and i know an offset might have done the Prob for me ! ).

greetz Max

Share this post


Link to post
Share on other sites



Guinness has a script to get desktop dimensions:

There is an Advanced Pixel Search Library on the forums.

Check out the Macro Reference under Contents in the AutoIt Help file:

@DesktopHeight
@DesktopWidth

I really should have asked why you need to do so before providing you with any information. Why? Whats your objective?


Spoiler

censored.jpg

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I'm running a Vm on my second monitor and want to use some old scripts in it but ran from the main system. And so i had the problem with the cords which get deduced from the main resolution... thats why i thought i might be able to set a new 0 point and thus get around writing the stuff anew. Lookin in the autoit help now thx in advance ;)

greetz

edit: I know my Desktop Reolutions pretty well... dosent help me to set them for Autoit... I rly dont want to change the running scripts so the question stands if i just can tell autoit i shall use the second monitor and ignore the first one ? Or start counting from the second one thus making the old x/y 1920/0 to a 0/0 for the future reference ( such as mouseclick ect ).

Edited by Maxel

Share this post


Link to post
Share on other sites

If you're using macros and need to change the value then you can always save it in a variable and reuse or reset the variable.

Dim $iStartPoint = @DesktopWidth ; You may be able to use this as your starting point.
Dim $iAdjust = 10
MsgBox(0, "Desktop Width", $iStartPoint)
$iStartPoint += $iAdjust
MsgBox(0, "Starting Point Adjusted", $iStartPoint)

Spoiler

censored.jpg

 

Share this post


Link to post
Share on other sites

So i need to add the offset after all to every mouseclick. Sigh too bad ^^ hoped autoit had such function inbuild. Thx for the fast answers ;)

greetz

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

No problem, we're here to help. ;)

Edited by Decipher

Spoiler

censored.jpg

 

Share this post


Link to post
Share on other sites

Ok its finished for me can be closed ! Found some options in the VM-Ware to help me along

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