Classic Scripting Addition and Jaguar

I have just upgraded to Jaguar from MacOS 9.2.2 and am in over my head trying to get a script running.

I have SAS, which is a Classic application not being ported to MacOS X, and an associated Scripting Addition. The Scripting Addtion launches SAS, feeding in user-specified options (obviously SAS was ported from a command-line environment). And I have a script, run from within BBEdit, that uses the Scripting Addition to launch SAS, passing the in the name of the file BBEdit is editing. This gives me a pseudo-development environment with a real editor instead of the one that comes with SAS.

I’m now trying to get this combination to work under Jaguar. My understanding from the AppleCare Knoweldge Base Article #75229 is that using Classic Scripting Additions under MacOS X requires using a Using Terms From block to make the terms in the Scripting Addition available.

Here’s my problem. The Scripting Addition is just that – a “scripting addition”, not a “classic application” as many of the other items in the Scripting Additions folder in my MacOS 9 System Folder are. And the Using Terms From syntax apparently requires the file to be an “application”, not a “scripting addtion”. Not taking the syntax at its word, I tried creating a Using Terms From block with the “scripting addition”, but when I “check” the script (using Script Editor 1.9 and AppleScript 1.9.1), a dialog box asks me “Where is” the scripting addition, it lists my applications, and when I browse to my MacOS 9 System Folder Scripting Additions, only the “classic applications” are selectable, not the “scripting additions.”

Am I sunk? Or is there some syntax like “Using Terms From Addition …” that would make this work?

Hi,

I’m sorry that I can’t help out, but apart from the solution to get what you have working (if possible) another line is to see whether there are alternative ways to get done what you want to be done. So, what does the current app do for you?

Bye for now,

Bert

“using terms” is only for applications, not for osaxen. I think your osax should be launched with your classic environment at startup time, and may work rigth under it.

Perhaps your problem is that you’re running the script from a osx environment (eg, “BBEdit X”). Your script with classic osaxen should work only under a classic environment. Another workaround, a little tricky, is hardcoding osaxen raw events within a classic-app tell block. Eg:

tell application "SAS"
   «event aevtEniD» "looney tunes" -- 5HOTA's enigma osax command "ENIGMAd"
end tell

More info at applescript-users list archives: http://search.lists.apple.com/applescript-users?q=classic+osax+os+x&m=all&o=0&wf=200010&wm=sub&ps=10