0
votes

Is there a way to get the result of an Automator action (e.g. 'Get specified file items' or 'Get selected Finder items'), count it and then use the number to determine an Applescript delay (so if there are 5 items, the command is set as 'delay 5.0')?

I had something like this in mind:

tell application "Finder"
    count input
    set file_total to result
    set result as variable
end tell

Thanks

Tardy

1

1 Answers

0
votes

I know this seems strange, but I think I might have answered my own question. So I will post this for anyone curious. This is what you put into the Applescript block in an Automator workflow after the files you want to count have been the result of the last action:

on run {input, parameters}
count input
set file_total to result
set my_variable to result
delay 1 * result
end run