| View previous topic :: View next topic |
| Author |
Message |
drmurdoch
Joined: 10 Nov 2006 Posts: 89
|
Posted: Wed Mar 12, 2008 11:24 pm Post subject: APPEND to clipboard with control +g [g = glue] |
|
|
everyone knows windows cut,copy,paste.
I'd like a glue function where the currently selected text is appended onto a new line to what is already in the clipboard.
I am hoping this is easy !
| Code: | #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
^g::
clipboard = %clipboard%
ClipisSaved := clipboard
Send ^c
clipboard = %clipboard%
clipboard = %ClipisSaved% \R %clipboard%
return |
Works but I can't get the appended text on a new line.
what is the string equivalent of a new line ? |
|
| Back to top |
|
 |
drmurdoch
Joined: 10 Nov 2006 Posts: 89
|
Posted: Wed Mar 12, 2008 11:52 pm Post subject: here it is |
|
|
Control + g = append to clipboard.
| Code: | #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
^g::
clipboard = %clipboard%
ClipisSaved := clipboard
Send ^c
clipboard = %clipboard%
clipboard = %ClipisSaved%`r`n%clipboard%
;StringReplace, clipboard, ClipisSaved, 'n, clipboard
return |
|
|
| Back to top |
|
 |
BoBoĻ Guest
|
Posted: Wed Mar 12, 2008 11:55 pm Post subject: |
|
|
| Code: | ^g::
ClipSaved := ClipBoard
Send ^c
ClipBoard := ClipSaved . "`n" . ClipBoard
MsgBox % ClipBoard
Return |
|
|
| Back to top |
|
 |
|