tp9191 Posted March 6, 2014 Share Posted March 6, 2014 Basically I'm just trying to get coordinates, and when I find the coord I need, I want to click (or press some other key) and have it append it to the console. I would append to a file, but that requires even more time for me to learn it. Thanks! I'm pretty stupid with this stuff, so please bear with it. HotKeySet("{F1}", "f1") HotKeySet("{F11}", "Terminate") #include <Misc.au3> While 1 Sleep (50) WEnd Func Terminate() Exit 0 EndFunc Func f1() Opt("MouseCoordMode", 1) ;1=ab,0=re,2=cl While 1 $pos = mousegetpos() Traytip("Mouse Pos","X:"&$pos[0]&" Y:"&$pos[1],"") Wend If _IsPressed (01) Then ConsoleWrite ($pos [0] & $pos [1] & @CRLF) EndIf EndFunc Link to comment Share on other sites More sharing options...
Damein Posted March 7, 2014 Share Posted March 7, 2014 So the main problem with your script is that your Tooltip is overriding any ability to move onto a new function or action. IE: Even when you press something, your While function updating your Tooltip isn't passing it through. Why not just do it like this? Func f1() Opt("MouseCoordMode", 1) ;1=ab,0=re,2=cl $pos = MouseGetPos() TrayTip("Mouse Pos", "X:" & $pos[0] & " Y:" & $pos[1], "") EndFunc ;==>f1 You don't get a 24/7 update, but each time you press F1 you see the coordinates. Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
reb Posted March 7, 2014 Share Posted March 7, 2014 (edited) Your Modified code expandcollapse popupHotKeySet("{F1}", "f1") HotKeySet("{F11}", "Terminate") #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") While 1 Sleep (200) WEnd Func Terminate() DllClose($hDLL) Exit 0 EndFunc Func f1() Opt("MouseCoordMode", 1) ;1=ab,0=re,2=cl While 1 $pos = mousegetpos() If _IsPressed (01) Then While _IsPressed("01", $hDLL) Sleep(250) WEnd Traytip("Mouse Pos","X:"&$pos[0]&" Y:"&$pos[1],"") ConsoleWrite ($pos [0] & " " & $pos [1] & @CRLF) EndIf ;~ Traytip("Mouse Pos","X:"&$pos[0]&" Y:"&$pos[1],"") Sleep(200) Wend EndFunc REB Edited March 7, 2014 by reb MEASURE TWICE - CUT ONCE 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