Re: chevrons
Re: chevrons
- Subject: Re: chevrons
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 30 Sep 2003 21:48:52 -0700
On 9/30/03 9:17 PM, "Walter Ian Kaye" <email@hidden> wrote:
>
> Also, can't "constant" be used in chevrons? I'm sure I've seen this
>
> recently when coercing enums to strings.
>
>
Yes, but it takes an 8-byte value rather than a 4-byte value. You can
>
often get by with using "****" for the first four bytes.
>
>
<<constant afdrpref>> -- preferences folder
>
<<constant ****pref>>
Another trick is to use 'run script'. I had to do that for a script that
needed to run in either of two versions of an app, using an if/else
branching. I couldn't compile the script because the enum from the version I
didn't have open wouldn't compile. But this worked:
if theVersion is "2.0" then
set aVar to (run script "get enum1 of theObject")
else if theVersion is "3.0" then
set aVar to (run script "get enum2 of the Object")
end if
That compiles since "enum1" and "enum2" are both strings here, and it runs
because only the correct version's 'if' clause runs at runtime and its run
script string evaluates without problem, while the other if clause is
skipped.
--
Paul Berkowitz
_______________________________________________
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.
References: | |
| >Re: chevrons (From: Walter Ian Kaye <email@hidden>) |