Help me to understand Applescript/workflow

Discussion in 'Mac Programming' started by cefey, Mar 24, 2016.

  1. cefey macrumors newbie

    Joined:
    May 20, 2010
    #1
    Hello everyone,

    I hope someone will take their time and answer few of my questions.

    I´ve been using mac for a while but never did anything with workflow. Learning it sounds like a good idea!


    I found few pre-installed wf on my mac. Some of them run AS, like:

    on run {input, parameters}

    set thisURL to item 1 of input as string

    So my first question: When it says "thisURL", how can I find out which URL it´s referring to?
    Second question: In workflow it says just "run applescript". Is the script itself the one that is typed in the box (set thisURL to...") or is it get saved somewhere else (I need to make it first?) and then add to WF?


    Many thanks,

    More question will follow! :)



    So
     
  2. Red Menace macrumors 6502

    Joined:
    May 29, 2011
    Location:
    Littleton, Colorado, USA
    #2
    'thisURL' is a variable (the name can be whatever you want) that is being set to the first item of the parameter 'input', which is a list of items passed to the script's run handler by the previous action in the Automator workflow. After being typed or pasted into the text box, the script becomes part of that particular Run AppleScript action, and is saved with the workflow.
     

Share This Page