• 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: Scripting Palm Desktop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Palm Desktop


  • Subject: Re: Scripting Palm Desktop
  • From: Chris Page <email@hidden>
  • Date: Fri, 8 Mar 2002 06:02:11 -0800

On Wednesday, March 6, 2002, at 07:31 , Phi Sanders wrote:

-- example script 2
-- this memo will get a title but not a body

set vBody to (the clipboard) as text
set vClipCount to the count of characters in vBody

if (vClipCount < 0) then
-- no data on the clipboard
-- exit quietly
else
set vDate to (current date) as string

set vTitle to "Clipboard -" & vDate

--make the memo
tell application "Palm Desktop"
create new memo with {title:vTitle, body:vBody}
end tell

end if

The problem is that vBody contains styled text, and Palm Desktop only accepts plain text for the body property. It doesn't attempt to coerce other types of text, so it can't accept international text, either, for example. It really should be returning an error result, but instead it silently stops processing the initialization record if it encounters any problems. So, for example, if you change the order to {body:vBody, title:vTitle} you'll find that even the title doesn't get set.

I couldn't figure out how to get plain text from the clipboard. I guess X always applies a style to the text in order to capture an encoding value (via the font).

--
Chris Page - Mac OS Lead, Palm Desktop - Palm, Inc.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Palm Desktop & Styled text
      • From: Phi Sanders <email@hidden>
References: 
 >Re: Scripting Palm Desktop (From: Phi Sanders <email@hidden>)

  • Prev by Date: Re: How can I tell what osaxen are used in a script
  • Next by Date: Re: Somewhat Dynamic HTML
  • Previous by thread: Re: Scripting Palm Desktop
  • Next by thread: Palm Desktop & Styled text
  • Index(es):
    • Date
    • Thread