Gash05 Posted October 1, 2006 Share Posted October 1, 2006 (edited) I've looked over the help file a little bit, and I've found what command I need, but I have no idea how to put it together. Here's what I want Dialog box w/instructions ==> User moves mouse to desired coord ==> User clicks left mouse button ==> MouseGetPos records position ===> Recorded position is assigned a variable Anyone know how to do this? The concept seems easy, and I'm actually embarassed that I cannot figure it out. Please help? I know that I need an if statement (I think) so when the 01 button is pressed (left mouse), then AutoIt will record the coord and place it in a variable. Edited October 1, 2006 by Gash05 Link to comment Share on other sites More sharing options...
creeping Posted October 1, 2006 Share Posted October 1, 2006 Something like this? #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 If _IsPressed("01", $dll) Then $cord = MouseGetPos() MsgBox(0, "", "x = " & $cord[0] & " y = " & $cord[1] ) EndIf Sleep(10) WEnd DllClose($dll) Link to comment Share on other sites More sharing options...
Gash05 Posted October 1, 2006 Author Share Posted October 1, 2006 Something like this? #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 If _IsPressed("01", $dll) Then $cord = MouseGetPos() MsgBox(0, "", "x = " & $cord[0] & " y = " & $cord[1] ) EndIf Sleep(10) WEnd DllClose($dll) It seems like it'll work but I'm at work right now so I can't test it What is the purpose of the.dll part? Is it neccessary? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 1, 2006 Moderators Share Posted October 1, 2006 It seems like it'll work but I'm at work right now so I can't test it What is the purpose of the.dll part? Is it neccessary?Only if you want to use _IsPressed(). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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