Applescript "do shell"

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

  1. macrumors 6502

    jaikob

    Joined:
    Jul 1, 2008
    Location:
    Freeland, MI
    #1
    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:
    /cmd

    it will open the terminal program and display this:
    Code:
    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:

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

    jaikob

    Joined:
    Jul 1, 2008
    Location:
    Freeland, MI
    #2
    I decided to use a different approach by using terminal.
     

Share This Page