On Fri, 19 Dec 2003 02:17:11 +0000, thor
<[EMAIL PROTECTED]> wrote:

> 
> Hi there guys !
> 
> I need to start a Java server which I use to
> communicate between Director and a sound application.
> 
> I usually start it up by using the Terminal, but if I
> want to distribute the application, then I'd rather
> have this automatic, i.e. the user should not have to
> start up the terminal and do some messy stuff there.
> 
> Is it possible to call Java classes from Director?
> 
> There might be an xtra, but I'd rather not have to buy
> one.
> 
> Would you recommend AppleScript for this perhaps?
> 
> Any tips?

Applescript will work, and actually you can call the shell without even
opening the terminal. Check the dictionary for 'standard additions' under
'miscellaneous commands'

do shell script: execute a shell script or command using the âshâ shell
 do shell script  plain text  -- the command or shell script to execute.
Examples are âlsâ or â/bin/ps -auxwwwâ
  [administrator privileges  boolean]  -- execute the command as the
administrator
  [password  plain text]  -- use this administrator password to avoid a
password dialog
  [altering line endings  boolean]  -- change all line endings to
Mac-style and trim a trailing one (default true)
 [Result:   plain text]  -- the command output

The only thing is that you'll have to make the applescript as an
application and launch it with Director's 'open' command, but this is
hardly a big deal I think.

One gotcha is that Applescript uses 'sh', but the terminal uses 'tcsh'.
There are some differences, but you probably wont encounter them in this
case.

I'm wondering why you want to go this way round - if you're going to
launch an app, why not just lauch your server directly?

[So, when is someone going to make a 'do shell script' xtra for OSX?]

Brennan

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to