Jump to content

Clipboard Problem


NutherNoob
 Share

Recommended Posts

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

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

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...