Re: Scripting Palm Desktop
Re: Scripting Palm Desktop
- Subject: Re: Scripting Palm Desktop
- From: Phi Sanders <email@hidden>
- Date: Wed, 6 Mar 2002 00:00:13 -0500
I got started on this clipboard to memo script after a PC user bragged
about this feature in windows that was missing on the Mac, but I've tried
numerous variations on the originally posted script, with dismal results.
I can get the memo created reliably with literal text for the record, but
not so with variables - which is the point of course.
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"}
Another item from my testing is that if I coerce literal body text "as
international text" then it fails to set the body.
Good
====================================================
set itTitle to "My new memo 2" as international text
set itBody to "A reasonable
example of text
to be placed
in the memo"
--make the memo
tell application "Palm Desktop"
create new memo with {title:itTitle, body:itBody}
end tell
====================================================
Bad
====================================================
set itTitle to "My new memo 2" as international text
set itBody to "A reasonable
example of text
to be placed
in the memo" as international text
--make the memo
tell application "Palm Desktop"
create new memo with {title:itTitle, body:itBody}
end tell
====================================================
~Phi
In a message sent on Tuesday, 2002 March, 05 @ 9:24 PM, by Chris Page :
>
On Monday, March 4, 2002, at 12:52 , Phi Sanders wrote:
>
>
> In a message sent on Monday, 2002 March, 04 @ 12:00 PM, by Jason
>
> W. Bruce :
>
>
>
>> Hi Phi,
>
>>
>
>> I think it has always been the case that the window
>
>> containing the
>
>> body of a memo must be updated in order for the contents to
>
>> become visible
>
>> -- which you can do by going to the previous memo and coming back
>
>> again.
>
>
I can confirm that this is the case.
>
>
>> Rather than capturing the result of create memo in vMemo, see if the
>
>> following construct works. I've never had a problem with it.
>
>>
>
>> Tell application "Palm Desktop"
>
>> create new new memo with {title: vTitle, body:vClip}
>
>> end tell
>
>
"new new" is a typo. This script works for me if I remove the extra
>
"new".
>
>
By "work" I mean that the memo title and body seem to be set
>
correctly, although the memo body isn't displayed correctly until
>
you refresh the memo window.
>
>
Are you certain there are cases where the body doesn't get set, and
>
it isn't just that the window display is incorrect? To confirm
>
this, try reading back the memo body after you create/set it.
>
>
--
>
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.