Jump to content
Sign in to follow this  
NutherNoob

Clipboard Problem

Recommended Posts

NutherNoob

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

Share this post


Link to post
Share on other sites
Paulie

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

Share this post


Link to post
Share on other sites
NutherNoob

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 :) )

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.