Automator Variables

Discussion in 'macOS' started by BramB, Jun 20, 2008.

  1. BramB macrumors newbie

    Joined:
    Jun 19, 2008
    #1
    I'm trying to make an automator workflow to create a terminal command.
    At the moment I have automator set to get 2 variables:
    1 - the current url in safari
    2 - a number specified by the user

    How can I combine those two variables into a terminal command that consist of the following parameters:

    "program command" "variable 1" "program option a" "program option b+variable 2".

    Someone has an idea?
     
  2. ntoxicated macrumors newbie

    Joined:
    Aug 29, 2009
    Location:
    Phoenix, AZ
    #2
    Hope this helps you.

    I ran across this post trying to figure this out, and I just figured out a way to do this. Each variable line can be referenced with $x, so if theres 3 lines of variables, for example:

    1. http://
    2. macrumors
    3. .com

    You can use the Run Shell Script action to run the command "open "$1""$2""$3"" to output the command "open http://macrumors.com".

    If you add spaces between "$1", "$2", and "$3", the command will have spaces too.
     

Share This Page