Raiho Posted July 8, 2019 Share Posted July 8, 2019 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 More sharing options...
Raiho Posted July 8, 2019 Author Share Posted July 8, 2019 Select Case _IsPressed(01,$hDLL)==True _WhileTriggLM() Case _IsPressed(01,$hDLL)==False _CoordListener() EndSelect Found it on my Own, Can be closed alienclone 1 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