Applescript - Closing dialog boxes after time

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

  1. Treemont macrumors newbie

    Joined:
    Apr 18, 2010
    #1
    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

    Joined:
    Aug 9, 2009
    #2
    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

    Caleb531

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

    Code:
    display dialog "Hello" giving up after 1200
     

Share This Page