closing a dialog window without user interaction using a time limit

Hello,

I work for a community college, and I’m attempting to write a script which displays a warning dialog box after the computer does a scheduled switch on. The only problem a foresee is if there is no-one to click Ok to the warnings. Apple script will not allow the computer to auto shut down at the end of the day with the dialog open.

Is there any way of displaying a dialog box for, say, 10 seconds, and for it to close itself after that time if there is no user input?

All help gratefully recieved

Thanks

Model: iMac
AppleScript: AppleScript 1.9.3
Browser: Safari 125.12
Operating System: Mac OS X (10.3.8)

display dialog “Your Message Here” buttons {“OK”} default button 1 with icon note giving up after 3600
will quit after appearing for 1 hour.

Thanks alot for your help! Works like a charm. :slight_smile: