Re: Scripting Palm Desktop
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.