Windows with TWO clipboards macro. Test it.

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Nilson Neves

Windows with TWO clipboards macro. Test it.

Post by Nilson Neves » Tue Feb 03, 2004 9:33 pm

sometimes in my Win98se the copy (CTRL-ALT-C) shows "cannot open clipboard"
...and the paste text (CTRL-ALT-V) sometimes is different.

comments, improvements?


Clipboard2 COPY.scp

GetClipBoard>WhatsInTheClipBoard1
rem Message>WhatsInTheClipBoard1
Press CTRL
Send Character/Text>c
Release CTRL
GetClipBoard>WhatsInTheClipBoard2
rem Message>WhatsInTheClipBoard2
Let>file=TEMP_DIR
ConCat>file,clipboard2.txt
PutClipBoard>WhatsInTheClipBoard1
DeleteFile>file
WriteLn>file,result,WhatsInTheClipBoard2


Clipboard2 Paste.scp

Let>file=TEMP_DIR
ConCat>file,clipboard2.txt
ReadLn>file,1,entiretext
Let>k=2
Label>start
ReadLn>file,k,line
If>line=##EOF##,finish
Let>entiretext=%entiretext%%CR%%line%
Let>k=k+1
Goto>start
Label>finish
GetClipBoard>WhatsInTheClipBoard1
PutClipBoard>entiretext
Press CTRL
send>v
Release CTRL
PutClipBoard>WhatsInTheClipBoard1

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts