Jump to content

New and Old Coordinates


Recommended Posts

Hi guys,

 i need the X,Y mouse coords from Point A to B, basically the moment i hold down my left mouse button would be the Point A, and from there would be Point B.

So my question is now... how would i be able to save the Point A Coords and the Point B coords in seperate Variables?

I never really had to think about it in C#, but since AutoIt is basically a Constant loop i end up updating my Point A no matter where or how i do my code...

Is there a good efficient way to do so?

Iam not quite familiar with AutoIT Yet.. i would appreciate any kind of tip and help.

 

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
  Select
      Case _IsPressed("01",$hDLL)
         _WhileTriggLM()
          EndSelect
WEnd
Func _WhileTriggLM()
        $MousePosNew = MouseGetPos()

        GUICtrlSetData($tbxXcoord,"xCoord: " & $MousePosNew[0])
        GUICtrlSetData($tbxYcoord,"yCoord: " & $MousePosNew[1])
        ;ConsoleWrite(@CRLF & "Xcoord: "&$MousePosNew[0]& @CRLF & "Ycoord: "&$MousePosNew[1])

EndFunc

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...