Clipboard - rtf format

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
papi20ver
Newbie
Posts: 10
Joined: Fri Jan 11, 2008 3:52 pm

Clipboard - rtf format

Post by papi20ver » Tue May 05, 2009 3:10 pm

Greetings.
I need copy/capture some text to clipboard in rtf format.
The text is formated, but when i give CTRL+C the text is got plain inside clipboard.
How may proceed to force this (CTRL+C) captured text fall inside clipboard at rtf format ? Is there any native parameter to define format on MacroScheduler ?
Cordially.
Papi

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

Post by Marcus Tettmar » Tue May 05, 2009 3:12 pm

Macro Scheduler does not alter the clipboard format. If Macro Scheduler sends CTRL-C to an app it does the same as YOU pressing CTRL-C. The format will depend on the app in question. Likewise when you paste or have Macro Scheduler send the keystrokes to paste the format will depend on what formats the target app expects. Macro Scheduler simply simulates what you do and doesn't interfere with the clipboard in any way. UNLESS you are using PutClipBoard to specifically write text to the clipboard from Macro Scheduler code, in which case you will be writing CF_TEXT.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

papi20ver
Newbie
Posts: 10
Joined: Fri Jan 11, 2008 3:52 pm

Post by papi20ver » Tue May 05, 2009 3:18 pm

Marcus, thanks.
Do you know any way to force Windpows to capture a selected text on rtf format ?
Papi
Papi

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

Post by Marcus Tettmar » Tue May 05, 2009 3:21 pm

No. The format placed in the clipboard is controlled entirely by the application you are copying from. Apps will often place the data on the clipboard in a number of formats. E.g. if RTF it will add TEXT too. Then when you paste if the app supports RTF it will take the RTF, otherwise just TEXT. You can't change how/what an app does with the clipboard (unless you are the developer/have the source).
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue May 05, 2009 10:19 pm

Is there any way you can deal with the file rather than with the display of the file? If you can read the file into Macro Scheduler using the ReadFile> function, all of the rich text format formatting characters will be available to be put to the clipboard.

If you are required to copy and paste from the screen, is it possible to open the file in Notepad? Notepad will display all of the RTF formatting characters so you will be able to highlight and capture them for placement on the clipboard.

papi20ver
Newbie
Posts: 10
Joined: Fri Jan 11, 2008 3:52 pm

Post by papi20ver » Wed May 06, 2009 1:09 pm

JRL
After use CTRL+C, the clipboard is full of plain text.
I believe that should exist some Windows API that manipulate it. I have API from product that publish the text and should manipulate WIndpows API to catch rtf format to clipboard.

I did search for this Win API, but not meet.
Obs.:
Is not possible to open file on other text editor (codification is proprietary).

Thanks for your help.
Papi

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