AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

APPEND to clipboard with control +g [g = glue]

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
drmurdoch



Joined: 10 Nov 2006
Posts: 89

PostPosted: Wed Mar 12, 2008 11:24 pm    Post subject: APPEND to clipboard with control +g [g = glue] Reply with quote

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
View user's profile Send private message
drmurdoch



Joined: 10 Nov 2006
Posts: 89

PostPosted: Wed Mar 12, 2008 11:52 pm    Post subject: here it is Reply with quote

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
View user's profile Send private message
BoBoĻ
Guest





PostPosted: Wed Mar 12, 2008 11:55 pm    Post subject: Reply with quote

Code:
^g::
   ClipSaved := ClipBoard
   Send ^c
   ClipBoard := ClipSaved . "`n" . ClipBoard
   MsgBox % ClipBoard
   Return
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group