Re: Scripting Palm Desktop
Re: Scripting Palm Desktop
- Subject: Re: Scripting Palm Desktop
- From: Phi Sanders <email@hidden>
- Date: Wed, 6 Mar 2002 14:21:17 -0500
Update:
I tried the example scripts under 9.2.2, Applescript 1.7, and Palm
Desktop 2.5 (changing "new memo" to "new note") and got the exact same
symptoms - specifically, you cannot take text from the clipboard and set
it into the body of the memo. My guess is this is related to the bug re:
coercing international text
~Phi
In a message sent on Wednesday, 2002 March, 06 @ 10:31 AM, by Phi Sanders :
>
Answers below :
>
>
In a message sent on Wednesday, 2002 March, 06 @ 3:39 AM, by Chris Page :
>
>
>On Tuesday, March 5, 2002, at 09:00 , Phi Sanders wrote:
>
>
>
>> The problem appears to be with setting the body, because if I
>
>> reverse the
>
>> order of the set, the title fails as well :
>
>> {body:"body",title:"title"} instead of {title:"title",body:"body"}
>
>
>
>But, as I asked before: Have you verified that the data is actually
>
>not being set, or is it just that the memo window display is stale?
>
>My testing only shows that the display is stale, but refreshing the
>
>window reveals that the data was set correctly.
>
>
>
>
Yes, I've tested that manually by closing and reopening the memo. I've
>
even gone so far as to quit Palm desktop and restart it - the memo body
>
remains blank.
>
>
The test environment I've been using is OS X 10.1.3 and Palm Desktop
>
4.0b77 with AppleScript 1.8.1 and the Script Editor. The target is for
>
this to be run from the script.menu, but I've been testing mostly from
>
the script editor since it doesn't yet behave reliably. I will try to
>
nuke an iMac back to OS 9 (all of my users are on X now) so that I can
>
test it in that environment, but I doubt that's the problem, and it won't
>
help my users...
>
>
>> Another item from my testing is that if I coerce literal body text "as
>
>> international text" then it fails to set the body.
>
>
>
>That seems like a bug to me. I looked at the code and it simply
>
>doesn't support international text for the body, even though it
>
>does for other fields. (It only supports typeChar, i.e., "text",
>
>and doesn't attempt to coerce other types.)
>
>
>
>--
>
>Chris Page - Mac OS Lead, Palm Desktop - Palm, Inc.
>
>
Right, the dictionary claims international text so I tried to coerce it
>
hoping that it would cure the missing body problem. As you can see, it
>
only exacerbated it.
>
>
More examples in the hope of proving to someone other than me that it's
>
not working :
>
>
>
-- example script 1
>
-- both of these memos are created OK
>
>
set kTitle to "My Literal Title"
>
set kBody to "My Literal body is a series
>
of lines of text about nothing
>
much in particular
>
and with no redeeming value"
>
>
set vTitle to text returned of (display dialog "Please specify a title
>
for the memo" default answer "Variable Title")
>
set vBody to text returned of (display dialog "Please specify a body for
>
the memo" default answer "Variable Body" & return)
>
>
tell application "Palm Desktop"
>
create new memo with {title:kTitle, body:kBody}
>
create new memo with {title:vTitle, body:vBody}
>
end tell
>
>
>
>
-- 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
>
>
>
>
~Phi
_______________________________________________
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.