Maxel Posted June 15, 2012 Share Posted June 15, 2012 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 Link to comment Share on other sites More sharing options...
Decipher Posted June 15, 2012 Share Posted June 15, 2012 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 @DesktopWidthI really should have asked why you need to do so before providing you with any information. Why? Whats your objective? Spoiler Link to comment Share on other sites More sharing options...
Maxel Posted June 15, 2012 Author Share Posted June 15, 2012 (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 June 15, 2012 by Maxel Link to comment Share on other sites More sharing options...
Decipher Posted June 15, 2012 Share Posted June 15, 2012 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 Link to comment Share on other sites More sharing options...
Maxel Posted June 15, 2012 Author Share Posted June 15, 2012 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 Link to comment Share on other sites More sharing options...
Decipher Posted June 15, 2012 Share Posted June 15, 2012 (edited) No problem, we're here to help. Edited June 15, 2012 by Decipher Spoiler Link to comment Share on other sites More sharing options...
Maxel Posted June 15, 2012 Author Share Posted June 15, 2012 Ok its finished for me can be closed ! Found some options in the VM-Ware to help me along 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