Re: Identifying app by creator code??
Re: Identifying app by creator code??
- Subject: Re: Identifying app by creator code??
- From: Chris Nebel <email@hidden>
- Date: Thu, 04 Jan 2001 11:43:21 -0800
- Organization: Apple Computer, Inc.
Jolly Roger wrote:
>
on 1/3/2001 6:38 PM, Chris Nebel wrote:
>
>
>> METHOD 1 (the "double-tell" method): ...
>
>>
>
>> METHOD 2 (the "raw event code" method): ...
>
>
>
> And, if you're using Mac OS 9...
>
>
>
> METHOD 3: (the "using terms from" method): AppleScript 1.4 (in Mac OS 9)
>
> introduced a new block called "using terms from" that was designed to solve
>
> precisely this problem. It's similar to the double-tell method, but is
>
> guaranteed to never ask you for the application at run time.
>
>
What happens when you try to run this on pre-OS 9 systems?
Here's what I've observed:
1. If you try to open a script that uses "using terms from" in a pre-Mac OS 9
Script Editor, the "using terms from" and anything inside it will be invisible.
It's all still there if you run the script, but you can't see the source -- much
like the infamous "disappearing script" bug a few months back.
2. If you run one, it works totally normally *unless* it's a normal (i.e. not
run-only) script or applet and it tries to modify some of its own properties.
In that case, you'll get an odd error when the shell tries to save the updated
properties (i.e., when the applet quits, or when OSA Menu finishes running the
script, or whatever), and the properties won't get saved.
I've found I get the best results using run-only applets.
--Chris Nebel
AppleScript Engineering