Thanks for the input, guys. The dirname and basename were exactly what I needed, working with cd in the shell. I had some trouble getting AppleScript to interface properly with Bash in executing these, so I reverted to perl (where I'm much more comfortable) to do the actual work. (I'm sure there's a way to get AppleScript to do it, but I knew how to do it in perl, and the AppleScript documentation I've found is terrible--though it's easy to make a simple graphical app) So the end result: A droplet in the Finder which uses AppleScript to call perl to call the shell to call Lilypond! But it works! The result is a very simple app. If you want to take a look, it is at www.shaffermusic.com/apps.html. Thanks again for your help.
Kris Shaffer On 4/8/05, Erik Sandberg <[EMAIL PROTECTED]> wrote: > On Friday 08 April 2005 19.29, Kris Shaffer wrote: > > Thanks for making such a great product. I love using Lilypond. I am > > currently working on an applescript app for Mac OS X that will allow a > > .ly file to be dragged to a Lilypond icon to create the PDF score > > without using the command line. My hopes is that it will help make > > Lilypond more accesible to traditional Mac users. However, when I > > call Lilypond (v. 2.2.5) from the appescript (i.e. do shell script > > "/sw/bin/lilypond [filename.ly]"), it outputs the score to / instead > > of the directory the source file is in. I'm wondering if there is a > > reason why it would not automatically export to the originating > > folder, as it does when I invoke it in the terminal. Perhaps the > > Applescript calling the shell script is the problem? Let me know if > > you know of a reason this may be behaving unexpectedly, or if you need > > more information from me. Otherwise, I will add some extra code and > > variables to get around the issue. Thanks. > > lilypond writes files to the current working directory. If you are in a > console, and you cd to e.g. /tmp/foo, and write > lilypond /bar/blah/x.ly > then the output will be located in /tmp/foo/. This is simply the convention > most Unix-style software use. > > You could either run lilypond with a different working directory, or you could > specify the output by passing -o to lilypond. You may be interested in > looking at the commands dirname and basename. > > Erik > _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user