Very Basic AppleScript Question

Discussion in 'Mac Programming' started by TheMTtakeover, Dec 12, 2012.

  1. TheMTtakeover macrumors 6502

    TheMTtakeover

    Joined:
    Aug 3, 2011
    #1
    Code:
    tell application "Terminal"
    	activate
    	do script "open -a "Activity Monitor""
    end tell
    How to make the above work? It doesn't like the dual set of quotation marks but I need because Activity Monitor is two words. I'm sure there is a very simple fix for this, I just don't know much about AppleScript.

    ----------

    Sorry solved.

    Code:
    tell application "Terminal"
    	activate
    	do script "open -a Activity' 'Monitor"
    end tell
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    Code:
    tell app "Activity Monitor" to launch
    
    That's plain ordinary AppleScript. You can copy and paste it into AppleScript Editor directly, and run it. Terminal.app doesn't need to be involved.
     
  3. charlieegan3 macrumors 68020

    charlieegan3

    Joined:
    Feb 16, 2012
    Location:
    U.K
    #3
    Yeah, go with this.

    You don't need terminal in there.
     

Share This Page