What I'm trying to is:

  1. Receive a string from "Ask for Text".
  2. Get a file from Finder.
  3. Do some codings these inputs in Applescript.

Seems like Applescript only receives file as input, I have no idea how to pass string from step 1 to it. Any suggestions are appreciated.

note: all "ignore action's input" are uncheck.

The workflow looks like this: enter image description here

  • Try this: apple.stackexchange.com/a/278497/12285
    – Tuesday
    Oct 10, 2018 at 9:52
  • You've set up the workflow correctly, you just need to process the input variable in AppleScript more attentively. If you get rid of your current script and just executed the line return input, then hopefully, you will see the Finder item and Variable_1's text value sitting together in an array. That being the case, you can access them using item 1 of input and item 2 of input.
    – CJK
    Oct 10, 2018 at 12:24

1 Answer 1


For my normal usage, typically when using a Set Value of Variable action, the subsequent action will have the [√] Ignore this action's input checkbox checked. This is because one does not typically set a variable and then pass it directly to the next action, unless of course the value of that variable will also be needed elsewhere in the workflow and the next action also makes use of the variable. Since a Ask for Finder Items action in your use case as shown in your question isn't going to use the variable, I've checked the [√] Ignore this action's input checkbox checked, in the Ask for Finder Items action. Of course adjust to your needs.

Now to pass both what's returned by the Ask for Finder Items action and the value of the Variable_1 variable, place a Get Value of Variable action between the Ask for Finder Items action and the Run AppleScript action.

Then in this case, input in on run {input, parameters} is a list of two items, the first being what was passed from the Ask for Finder Items action and the second being the value of the Variable_1 variable from the Get Value of Variable action, and here's an example AppleScript code addressing what is shown in your Run AppleScript action to handle it:

on run {input, parameters}

    set filePath to the POSIX path of item 1 of input
    set Answer to item 2 of input   -- This is the value of the Variable_1 variable.

    return filePath & Answer
end run

That said, the return line may not be practical as it's just concatenating two strings at that point, so I suspect this is just for testing to see that it actually can return the two pieces of information.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .