Please can someone advise why this is not working. I need the script to stop running when the user select “no”. (I’m only posting the section I’m having trouble)
try
set thisButton to button returned of (display dialog "Do you had enough time to choose the PDF style setting Resort Directory for Press" with icon caution buttons {"Yes", "No"} default button 1)
if thisButton is "Yes" then
close document 1 saving no
end if
if thisButton is "No" then
error number -128 --I want the script to stop
display dialog "You have to START the script again from Sript Editor" with icon caution buttons {"Cancel"} default button 1
end if
end try