I’m creating an automator action and I’m wondering how I can make a user option popup to skip a section.
Currently in automator this is a confirmation - yes to continue or no to cancel totally… (exits action)
What I’m wondering if there is a way to bypass a step in my automator action…
eg.
Select files
“user option screen: would you like to archive these files? Yes or No”
If yes go ahead and proceed to the next step of my automator action…
If no - skip archving and finish the rest of the script…
This is basically what you want?
this is generated by script editor by right clicking in the window and selecting dialogs > 2 buttons 2actions
display dialog "Would you like to archive these files?" buttons {"Yes", "No"} default button 2
if the button returned of the result is "Yes" then
--Do Archive Command Here
end if
-- rest of the script here
Hate to be a dork, but button names should always be verbs or terse verb phrases that reflect the consequences of the action of pressing the button. 
Ninja edit: Posted in case this Automator action is going to be used by multiple people or otherwise released to the public.
Thanks for the replies -
display dialog "Would you like to archive these files?" buttons {"Yes", "No"} default button 2
if the button returned of the result is "Yes" then
--Do Archive Command Here
end if
Maybe I was a little misleading - when saying automator action - I probably meant automator workflow -
The script I was asking above was just going to be a part of the workflow - inserted after “Get selected finder items” and “Create Archive” actions that are premade in automator.
So basically in between those 2 “actions” I’d be inserting a “run applescript” action.
Maybe it’s not possible to do in automator so my “run applescript” action needs to include the above as well as the archive applescripting as well?
The run applescript automator action starts with this already in place:
on run {input, paramenters}
--My script here
return input
end run