How can I end this script once the command has been run?

Discussion in 'Mac Programming' started by techmonkey, Dec 8, 2008.

  1. techmonkey macrumors 6502a

    Joined:
    Jun 8, 2007
    #1
    I created a script to open a specific Firefox profile, but the script stays open until I close Firefox. How can I end the script once Firefox opens?

    Code:
    do shell script "/Applications/firefox.app/Contents/MacOS/firefox -P Accounts-Firefox"
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    Either use activity monitor or use the kill command from the terminal (assuming it is run as a separate process).
     
  3. techmonkey thread starter macrumors 6502a

    Joined:
    Jun 8, 2007
    #3
    LOL, thats not much of a solution!

    Found this on another thread,

    added this "&> /dev/null &"

    to the end. Works like I want it to.
     
  4. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    Fair enough.
     

Share This Page