I created a script that uses multiple dialog boxes that the results are returned to other purpose. Is there a way to add a “Back” button in the dialog window to go back to the previous dialog window? The way it is now if i make a mistake in my answers I have to rerun the script from the begining.
You can add a button that says BACK fairly easily with the Buttons argument, but scripting the action that button causes would be up to you. There is no inherent “undo” stack, the code for the various dialogs would have to written by the developer.
ok thanks, but how do I tell applescript to go back to a specific place in my script? is it possible? what’s the syntax for writing this down?
Perhaps something like this
-- point A
set condition to false
repeat until condition
-- some script
set condition to button returned of (display dialog "Go back to point A?" buttons {"Back", "Ahead"}) ≠"Back"
end repeat
-- more script