• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Rich text - what is the best way to handle rich text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rich text - what is the best way to handle rich text


  • Subject: Re: Rich text - what is the best way to handle rich text
  • From: Stan Cleveland <email@hidden>
  • Date: Thu, 12 Mar 2009 02:35:06 -0700
  • Thread-topic: Rich text - what is the best way to handle rich text

On 3/9/09 1:56 AM, "KOENIG Yvan" wrote:

> If you run
>
> get the clipboard as record
>
> after copying to the clipboard the contents of a rtfd file (one with
> text and pictures), the log report states:
>
> tell current application
> the clipboard as record

<SNIP>

> I don't know how you would be able to pass the RTF and rtfd components.

I played around with Yvan's suggestion. Using AppleScript, you can forget
about the 'rtfd' data. However, you can either write the 'RTF ' data to a
file (with an .rtf extension) or push it back to the clipboard, but that's
about it. But then, maybe that's all you need.

    -- get RTF from clipboard
    set clipboardRec to the clipboard as record
    set richText to «class RTF » of clipboardRec
    -- or in one line
    set richText to «class RTF » of (the clipboard as record)
    -- write RTF to file
    set f to open for access file "Disk:Users:stanc:Desktop:Test.rtf" ¬
        with write permission
    write richText to f
    close access f
    -- push RTF back to clipboard
    set the clipboard to richText

Also, though I've not used it, there's a scriptable application named
Journler that appears to be able to retrieve and modify the color, size, and
font of rich text within the context of a personal journal. Of course, with
no personal experience with the software, I can't vouch for its
functionality. I mention it in case you want to investigate further.

HTH,
Stan C.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Rich text - what is the best way to handle rich text (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: Get List of window PC's in the network
  • Next by Date: Re: Get List of window PC's in the network
  • Previous by thread: Re: Rich text - what is the best way to handle rich text
  • Next by thread: Re: Rich text - what is the best way to handle rich text
  • Index(es):
    • Date
    • Thread