Hints, tips and tricks for newbies
Moderators: Dorian (MJT support), JRL
-
yken
- Newbie
- Posts: 17
- Joined: Thu Jan 18, 2007 3:42 pm
- Location: Turkiye
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
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- 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.
-
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?
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- 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.
-
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.
-
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