Posts: 9
Threads: 6
Joined: Oct 2009
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.
;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
Posts: 12,051
Threads: 140
Joined: Dec 2002
Simply use
key (ss)
Example:
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
Posts: 9
Threads: 6
Joined: Oct 2009
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.
str ss.getclip
str s
int i
for i 0 200
if(s.getl(ss -i)<0) break ;;no more
key (s)
key Y
Posts: 12,051
Threads: 140
Joined: Dec 2002
key (s) types all characters, including newlines and Unicode.