I am trying to get a dialogue box in mac using apple script.
tell application "System Events"
activate
display dialog "Enter your name: " default answer "" buttons {"OK"} default button "OK" with title "Good Name"
set the Name to text returned of the result
The problem i am facing is, when i don't enter name, the popup is closing by itself throwing error. But i want it to stay alive till user gives input