We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
open() on OS X (Read 318 times)
open() on OS X
Aug 19th, 2008, 2:07pm
 
Hello there,

I'm trying to use Processing to either invoke Lilypond (music notation software) on Mac OS X.

So far I've tried the following:

1) Trying to call the lilypond program from within its main package:

String[] args = {"/Users/mac/Desktop/lilypond.app/contents/resources/bin/lilypond","--pdf","/Use
rs/mac/Documents/Processing/Folping/test.ly"};
open(args);

2) Trying to call sh and a shell script (I've tested the script - works fine from Bash):

String[] args = {"sh","","makelily.sh"};
open(args);

Am I doing something wrong here? The complete lack of feedback in the debug window isn't really helping matters!

Any aid appreciated,

P
Re: open() on OS X
Reply #1 - Aug 19th, 2008, 2:58pm
 
call open() on the .app file. the reference for open() explains:

On Mac OS X, the "open" command is used (type "man open" in Terminal.app for documentation).

which will tell you the same.
Re: open() on OS X
Reply #2 - Aug 19th, 2008, 5:25pm
 
Thanks, Fry. That works so far as launching Lilypond editor goes. Unfortunately it's a script within the .app package that I need to call, which compiles files into notation. For example:

/Users/mac/Desktop/lilypond.app/contents/resources/bin/lilypond --pdf test.ly

- the above works fine as a shell script - is there any way to  get around this with Processing's insistence on using open?
Re: open() on OS X
Reply #3 - Aug 19th, 2008, 6:54pm
 
neew wrote on Aug 19th, 2008, 5:25pm:
is there any way to  get around this with Processing's insistence on using open

Nope, he insists and he won't listen to me.

But you can use Runtime.exec() from Java, or exec() in Processing which is just a shortcut to the same.
Page Index Toggle Pages: 1