Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
paste+ since VM prohibits clipboard paste
I see paste[+] will send keys instead of pasting the clipboard. That is what I need since Virtual Machines sometimes block clipboard pasting. The problem is that paste+ can't be forced to send keys if the clipboard contents is longer than 100 chars. Below, is code I can maybe currently use in a pinch to send many lines. I don't really know what paste+ is doing but I fear it is a lot of code to handle all the special characters. I'm a DBA working on customer sites very often and need to paste in debugging scripts with ease to be able to get anything done reasonably fast.

Copy      Help
;str s.getsel
;paste + s

str s
str ss="one[]two[][]four[]"
int i
for i 0 200
    if(s.getl(ss -i)<0) break ;;no more    
    paste+ s
    key Y
Simply use
key (ss)


str s1="short single-line text"
str s2="long or multi-line text"


paste+ s1
paste+ s2

is the same as

key (s1)
paste s2
Wow! I didn't know that "key (s)" would type out embedded tabs.
As always, I'm very impressed by your intelligence.
The simple code below fills my needs perfectly.

Copy      Help
str ss.getclip
str s
int i
for i 0 200
    if(s.getl(ss -i)<0) break ;;no more    
    key (s)
    key Y
key (s) types all characters, including newlines and Unicode.

Forum Jump:

Users browsing this thread: 1 Guest(s)