Jump to content



Photo

Defining the Start Point for Clicking


  • Please log in to reply
6 replies to this topic

#1 Maxel

Maxel

    Seeker

  • Active Members
  • 6 posts

Posted 15 June 2012 - 07:56 AM

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







#2 Decipher

Decipher

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 337 posts

Posted 15 June 2012 - 09:09 AM

Guinness has a script to get desktop dimensions: http://www.autoitscript.com/forum/topic/134534-desktopdimensions-details-about-the-primary-and-secondary-monitors/

There is an Advanced Pixel Search Library on the forums.

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


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

#3 Maxel

Maxel

    Seeker

  • Active Members
  • 6 posts

Posted 15 June 2012 - 09:54 AM

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, 15 June 2012 - 10:05 AM.


#4 Decipher

Decipher

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 337 posts

Posted 15 June 2012 - 10:06 AM

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)

Posted Image

#5 Maxel

Maxel

    Seeker

  • Active Members
  • 6 posts

Posted 15 June 2012 - 10:31 AM

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

#6 Decipher

Decipher

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 337 posts

Posted 15 June 2012 - 10:36 AM

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

Edited by Decipher, 15 June 2012 - 10:36 AM.

Posted Image

#7 Maxel

Maxel

    Seeker

  • Active Members
  • 6 posts

Posted 15 June 2012 - 11:54 AM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users