Applescript - Closing dialog boxes after time

Discussion in 'Mac Programming' started by Treemont, Apr 18, 2010.

  1. Treemont macrumors newbie

    Apr 18, 2010
    I am wondering if there is a way to close a dialog after, say, 20 minutes even if no button has clicked. Alternatively if there is a way for the script to continue after a certain amount of time even if the dialog box doesn't receive input.
  2. chown33 macrumors 604

    Aug 9, 2009
    descending into the Maelström
    Launch your script editor.

    Open the scripting dictionary of Standard Additions.

    Look at the reference for the 'display dialog' command (under the User Interaction section).

    Note the 'giving up after' clause.
  3. Caleb531 macrumors 6502


    Oct 17, 2009
    You can have any dialog box close after a number of seconds (if you haven't clicked a button already).

    display dialog "Hello" giving up after 1200

Share This Page