How to show a dialog and capture if user cancelled

I have a mutistep script (opening different apps) which currently uses the alert dialog asking if user wants to continue or stop script

I would like to add a script step that shows a dialog asking 2 buttons “ok” to continue one script path and “cancel” to continue another script path

How can I do this in KM9 ?

You can do this using the Action Prompt for User Input and then following that with an If Then Action or a Switch Case Action which does something different depending if you press "OK" or "Cancel". Normally the Cancel Button would be checked to have "Cancel Macro" so, you need to uncheck that option to use the Cancel Button as a normal button. Harder to explain than just to show so, here is an example Macro:

EXAMPLE Prompt with 2 button outcomes.kmmacros (6.3 KB)

4 Likes