Paste with format

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
yken
Newbie
Posts: 17
Joined: Thu Jan 18, 2007 3:42 pm
Location: Turkiye

Paste with format

Post by yken » Mon Mar 07, 2011 10:17 am

Hi!
I'm copying several paragraphs on the website and pasting them into a word document. But they are pasting with plain texts. Is there a way of pasting them to their own formats?
This is my code of copying...

Code: Select all

...
...
SRT>pickpick
let>k=0
let>t=0
wait>0.05
press ctrl
wait>0.1
send>c
wait>0.1
release ctrl
wait>0.05
GetClipBoard>mlo
Wait>0.06
let>nll%k%=mlo
let>mlo=
let>k=k+1
END>pickpick
This is my code of pasting...

Code: Select all

Repeat>t
Wait>0.05
PutClipBoard>nll%t%
Wait>0.05
press ctrl
wait>0.05
send>v
wait>0.1
release ctrl
wait>0.05
Press Enter
Wait>0.05
let>t=t+1
Wait>0.03
Until>t=k

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Mar 07, 2011 10:19 am

No. GetClipBoard and PutClipBoard use plaintext only.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

yken
Newbie
Posts: 17
Joined: Thu Jan 18, 2007 3:42 pm
Location: Turkiye

Post by yken » Mon Mar 07, 2011 10:32 am

Just no?
Any solutions?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Mar 07, 2011 10:36 am

Just no.

GetClipBoard is designed to get textual data into a variable. And PutClipBoard does the opposite. Macro Scheduler supports strings and numbers. It does not offer the ability to store binary data. So I'm not sure how you could manipulate non-text clipboard formats anyway.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

yken
Newbie
Posts: 17
Joined: Thu Jan 18, 2007 3:42 pm
Location: Turkiye

Post by yken » Mon Mar 07, 2011 11:10 am

Thanks. :(

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue Mar 08, 2011 1:21 am

Hi yken,

Since GetClipBoard and PutClipBoard only deal with plaintext, try to rewrite your macro so it does not use those commands... but simply sends CTRL+C and CTRL+V because if you can, you will not loose the format and the paste will work as you expect.

If you have to store one or many input text blobs (with their format) and then later load and paste them (again with their format) into another web page or app, then the ideas discussed in the following post may be helpful:

Detect Image Data on Windows Clipboard plus Save and Restore

Take care
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

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