15

This is a super simple thing I am trying to get my head around

I want to use something like WINKEY + ALT + C to paste ** - words** so that I can sign-off my posts or whatever using the three-key combo

1
  • What is your question? Show us what you've tried! Commented Nov 28, 2013 at 9:24

2 Answers 2

25

Not sure what exactly you want, maybe something like this?

Press WINKEY + ALT + C to paste the clipboard contents:

#!c::
  SendInput, ^v
Return

Press WINKEY + ALT + C to paste "Some random text"

#!c::
  SendInput, Some random text
Return
Sign up to request clarification or add additional context in comments.

Comments

1

Instead of Sendinput which will type each characters you can use a clipboard paste approach. See for example https://github.com/tdalon/ahk/blob/59a8ab2a8fd497b4a5b5a85e73e32ff95d5d4425/Lib/Clip.ahk

Clip_Paste(sText,restore := True) {
; Syntax: Clip_Paste(sText,restore := True)
If (restore)
    ClipBackup:= ClipboardAll
Clipboard := sText
WinClip.Paste()
If (restore) 
    Clip_Restore(ClipBackup)
} ; eofun

; ---------------------------------------------------------------------------
Clip_Restore(ClipBackup) {
Clip_Wait() ; in order not to overwrite running clipboard action like pasting
Clipboard:= ClipBackup
} ;eofun
; ---------------------------------------------------------------------------
Clip_Wait(){
Sleep, 150
while DllCall("user32\GetOpenClipboardWindow", "Ptr")
    Sleep, -1
} ; eofun

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.