1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Applescript "do shell"

Discussion in 'Mac Programming' started by jaikob, Feb 1, 2009.

  1. macrumors 6502


    I am trying to develop an application based upon a command.' (Applescript)

    The command has to be initialized first, so if i type in terminal:

    it will open the terminal program and display this:
    You are now using application, please select your option, 1, 2, or 3.
    [Default 2]
    After the application has started, I can tell it what I want to do.

    What I cant do is this: /cmd option 2
    I cannot pass the parameters after the command.
    I need a way to initialize the command, and then run a command inside of the command I called.
    Here is my code:

    on clicked theObject
        do shell script "/cmd"
        display dialog "Command Started"
    end clicked
    Thanks for the help.
  2. macrumors 6502


    I decided to use a different approach by using terminal.

Share This Page