RosettaCodeData/Task/Simple-windowed-application/AppleScript/simple-windowed-application.applescript

16 lines
492 B
AppleScript
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
set counter to 0
set dialogReply to display dialog ¬
"There have been no clicks yet" buttons {"Click Me", "Quit"} ¬
with title "Simple Window Application"
set theAnswer to button returned of the result
if theAnswer is "Quit" then quit
repeat
set counter to counter + 1
set dialogReply to display dialog counter buttons {"Click Me", "Quit"} ¬
with title "Simple Window Application"
set theAnswer to button returned of the result
if theAnswer is "Quit" then exit repeat
end repeat