[futurebasic] Re: [FB] Sending an AppleScript to the Finder and unix shell in OS X

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2002 : Group Archive : Group : All Groups

From: Ben Jamin <benjamen@...>
Date: 10 Jun 2002 09:11:38 +1000
You don't need any OSAXen to get to the shell, there is already a command in the OS called something like "do shell  script".  Just open the Finder with Script Editor and look at the dictionary.

Also,because its an AppleEvent you don't need AppleScript either, you can just do something like this:

SendAppleEvent(_"misc",_"dosc","MACS","whatever shell commands here"..)

I cannot remeber the exact event codes, but it should get you started.

This brings me to my third point of interest.  OSADoScript leaks memory in OSX and carbon and every OS it has ever been in. ( Maybe it has been fixedin 10.1.5?)

I would recommend against using AppleScript for anything over and over, as the memory loss will build up.

Jamin

On 10/06/02 12:42 AM, RICH LOVE <richlove@...> wrote:
>And now for something really cool...
>Now that we can send an AppleScript from FB in carbon, we can access 
>the
>unix shell in OS X with a free osax available at
>http://www.vampiresoft.com/Products/MacOS/osxpoweraddos.html
>