Re: Scripting in OSX: Classic osaxen for Classic apps? - SOLUTION
Re: Scripting in OSX: Classic osaxen for Classic apps? - SOLUTION
- Subject: Re: Scripting in OSX: Classic osaxen for Classic apps? - SOLUTION
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 09 Jun 2001 18:38:39 -0700
On 6/9/01 3:23 AM, "Bill Cheeseman" <email@hidden> wrote:
>
on 6/9/01 4:43 AM, Paul Berkowitz at email@hidden wrote:
>
>
> According to a page in the Help for OS X, you're supposed to be able to
>
> compile scripts in the OS X Script Editor which refer to classic scripting
>
> additions (for Classic or OS 8/9 use, of course) by enclosing the osax terms
>
> in a 'using terms from' construction, then wrapping that in a tell block to
>
> a classic app.
>
>
>
> Except that 'using terms from' is meant to take an application reference,
>
> and osaxen are not applications (it won't compile if you try with
>
> 'application "osaxName" ').
>
>
I pointed this out in my report on AppleScript in Mac OS X. I have no
>
solution.
Bill Fancher sent me the solution. It works. You do the two steps one at a
time. First you put the osax commands in a 'using terms from alias pathName'
block (pathName being the path to the osax in the OS 9.1 Scripting Additions
folder) and compile. That gives you the raw code in chevrons of the osax
command. Then you have to REMOVE the 'using terms from' block (to avoid that
'scripting component error') and wrap the lines, plus any others needed, in
a 'tell application "Classic App" ' block.
Hurray! Thanks, Bill. It will save lost of rebooting back and forth. And
there's no reason not to keep a growing script containing nothing but lots
of these commands compiled within their own 'using terms from' block, then
just copying and pasting the raw codes into other scripts as needed. Someone
so inclined could even go through entire osax dictionaries this way.
--
Paul Berkowitz