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?
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 &"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With