Main Area and Open Discussion > General Software Discussion
easily copy and paste multiple text strings
kalos:
hello
I want to copy text strings that are seperated by newlines or commas or tabs and I want to paste each one after the other (as I would read that text) by hitting a hotkey
for example:
this is, an example, of text
that I, want to, be pasted
I want to hit eg. CTRL+T and paste this is
then hit CTRL+T and paste an example
and so on
how can I do this?
thanks!
mouser:
Question:
Would it be helpful if the Ctrl+T pressing was automated as well?
kalos:
Question:
Would it be helpful if the Ctrl+T pressing was automated as well?
-mouser (December 29, 2011, 07:24 AM)
--- End quote ---
maybe, but how would I paste each string to the correct position in a grid?
mouser:
oh i thought it was an automated process where ctrl+T took you to the next field where you wanted to paste.
wr975:
I want to copy text strings that are seperated by newlines or commas or tabs and I want to paste each one after the other (as I would read that text) by hitting a hotkey
-kalos (December 29, 2011, 07:15 AM)
--- End quote ---
Hi,
here's a quick Autohotkey script. See attachment.
Usage:
1. Go to http://www.autohotkey.com and download/install the tool (AHK_L 32 bit unicode)
2. Copy your comma/tab/newline separated text in the clipboard
3. Start the script. It'll read the contents of the clipboard
4. Press CTRL+T to paste the text, or CTRL+E to exit the script
--- ---#SingleInstance force
x := clipboard
StringReplace,x,x,%A_Tab%,`,,1
Loop,Parse,x,`n,`r
y .= ((If y = "") ? "" : ",") . A_LoopField
StringReplace,y,y,`,`,,`,,1
msgbox,CTRL+T to paste text`nCTRL+E to exit script
Return
^E::
ExitApp
Return
^T::
z := ""
Loop,Parse,y,`,
{
If (Trim(A_LoopField) = "")
Continue
if (z = "")
z .= Trim(A_LoopField)
else
y1 .= ((If y1 = "") ? "" : ",") . A_LoopField
}
y := y1
y1 := ""
If (z = "")
{
ToolTip, Nothing more to paste...
Sleep,5000
ToolTip
Return
}
Clipboard := z
Send,^v
return
Navigation
[0] Message Index
[#] Next page
Go to full version