tags:

views:

262

answers:

1

I can created an (very) simple applescript app to run Firefox background & exit. (The reason is I have different profiles for work & home). My script is basically:

do shell script "/Applications/firefox.app/Contents/MacOS/firefox -no-remote -P 'Personal' &"

It works, but the script/app doesn't exit until I quit Firefox. How can I fix that?

+3  A: 

You need to redirect stdout and stderr somewhere. The do shell script command knows that the pipes it setup for the program's stdout and stderr are still open, so it waits for them to be closed.

do shell script "/Applications/firefox.app/Contents/MacOS/firefox -no-remote -P 'Personal' > /dev/null 2>&1 &"
Chris Johnsen
That worked, thanks!
Bill