Re: Can't set Palm Desktop custom fields
Re: Can't set Palm Desktop custom fields
- Subject: Re: Can't set Palm Desktop custom fields
- From: "Jason W. Bruce" <email@hidden>
- Date: Sun, 22 Apr 2001 14:42:01 -0500
Application dictionaries contain english words which correspond to
parts of the application you wish to script. AppleScript translates these
english words into so-called "raw codes" for its own internal processing.
These "raw codes" are a series of letters separated by opening and closing
chevons. If you know the raw codes which correspond to the parts of the
application you wish to script, you can type these raw codes directly into
your script in place of the english words -- otherwise known as using
chevron syntax.
When the Palm Desktop went from 2.5 to 2.6, its dictionary changed,
but it still claimed to retain the same apple events. So, while one may not
be able to set a custom field using Palm Desktop's current english terms,
one still may be able to set custom fields by using chevron syntax.
Smile (www.tandb.com.au/smile/) is a free script editor which has a
feature (called "Copy Translate") which allows one to determine what the
chevron syntax is for a scriptable application's terms. When the Palm
Desktop went from 2.5 to 2.6, its dictionary changed the term for the
contents of a custom field from "fieldtext of custom1 of contact 1" to
"text of custom 1 of address 1." The problem is that "text" is an
AppleScript keyword -- which Smile can't translate into a chevron syntax.
So, you can't use Smile's Copy Translate feature to figure out what the raw
code is for the contents of a custom field in 2.6, but you probably could if
you had 2.5 (because there you're translating "fieldText" as opposed to
"text").
What I do to get around this is just use other fields as custom
fields (like "title," birthday", etc.). HTH.
HTH,
Jason Bruce
>
Message: 11
>
Date: Sat, 21 Apr 2001 21:56:59 -0500
>
Subject: Re: Can't set Palm Desktop custom fields
>
From: Irwin Poche <email@hidden>
>
To: <email@hidden>
>
CC: "Jason W. Bruce" <email@hidden>
>
>
Raw codes? Smile? Sounds like fun. Care to educate me?
>
>
> From: "Jason W. Bruce" <email@hidden>
>
> Date: Sat, 21 Apr 2001 13:36:13 -0500
>
> To: <email@hidden>
>
> Subject: Re: Can't set Palm Desktop custom fields
>
>
>
> The setting of custom fields in the Palm Desktop is broken in Palm Desktop
>
> 2.6. Although this version changed the dictionary from prior versions, it
>
> still claims to retain the same apple events. So, if you have Palm Desktop
>
> 2.0 (or perhaps 2.5) lying around, you may be able to use Smile to ascertain
>
> the raw codes for setting a custom field, and then use raw codes in your
>
> present script.
>
>
>
> Jason Bruce
>
>
>
>> Message: 10
>
>> Date: Wed, 18 Apr 2001 07:00:09 -0500
>
>> Subject: Can't set Palm Desktop custom fields
>
>> From: Irwin Poche <email@hidden>
>
>> To: <email@hidden>
>
>>
>
>> Hi - this is my first post to this list.
>
>>
>
>> If I try to set one of the custom fields of an address with either of these
>
>> scripts...
>
>>
>
>> tell application "Palm Desktop"
>
>> set text of custom 5 of address 0 to "howdy"
>
>> end tell
>
>>
>
>> tell application "Palm Desktop"
>
>> set custom 5 of address 0 to "howdy"
>
>> end tell
>
>>
>
>> I get an Execution Error that reads "Palm Desktop got an error" Can't set
>
>> custom 5 of address 0 to "howdy".
>
>>
>
>> Since the value returned from "custom 5 of address 0" is a string (not a
>
>> list) something like "title:Sister, text:Cindy" I've tried a variety of
>
>> combinations of strings (and lists) that look like this and they all fail.
>
>>
>
>> Does anyone know how to set a custom field ?
>
>>
>
>> Thanks a bunch,
>
>> Irwin
>
> _______________________________________________
>
> applescript-users mailing list
>
> email@hidden
>
> http://www.lists.apple.com/mailman/listinfo/applescript-users
>
>
>
--__--__--