NutherNoob Posted January 19, 2007 Share Posted January 19, 2007 Hi guys. Basically I'm trying to get the x,y coords of a left mouseclick to the clipboard and then using a hotkey, pasting it to wherever. Thanx for any help in advance. AutoItSetOption("MouseCoordMode", 1) ;Use Mouse Coordinates relative to: ;1-rel to screen HotKeySet("{PAUSE}", "Terminate") HotKeySet("{F1}", "Paste") While 1 $pos = MouseGetPos() ToolTip("" & $pos[0] & ", " & "" & $pos[1] & " Pause2exit") Sleep(10) WEnd ClipPut(MouseClick("left",$pos[0] & "," & $pos[1] ,1,1)) Func Paste() ClipGet() EndFunc Func Terminate() Exit EndFunc ;==>Terminate Link to comment Share on other sites More sharing options...
Paulie Posted January 19, 2007 Share Posted January 19, 2007 Hi guys. Basically I'm trying to get the x,y coords of a left mouseclick to the clipboard and then using a hotkey, pasting it to wherever. Thanx for any help in advance. #Include <Misc.au3> AutoItSetOption("MouseCoordMode", 1) ;Use Mouse Coordinates relative to: ;1-rel to screen HotKeySet("{PAUSE}", "Terminate") HotKeySet("{F1}", "Paste") While 1 $pos = MouseGetPos() ToolTip("" & $pos[0] & ", " & "" & $pos[1] & " Pause2exit") Sleep(10) If _Ispressed(01) then $pos = MouseGetPos() ClipPut($pos[0] & "," & $pos[1]) Endif WEnd Func Paste() Send(ClipGet()) EndFunc Func Terminate() Exit EndFunc ;==>Terminate UNTESTED Excuse formatting, at school, no SciTE Link to comment Share on other sites More sharing options...
NutherNoob Posted January 19, 2007 Author Share Posted January 19, 2007 Wow!!! What a quick response and it solved my problem too!! Thanx so much! Just goes to show how difficult simple things can be (to me anyway ) 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