home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Utilities / Programming / Dialog Director 0.6 / Examples / Timeout.as < prev   
Encoding:
Text File  |  1997-04-17  |  715 b   |  19 lines  |  [TEXT/ToyS]

  1. set dVals to dd auto dialog {size:[320, 95], contents:[¬
  2.     {class:push button, bounds:[250, 65, 310, 85], name:"OK"}, ¬
  3.     {class:push button, bounds:[170, 65, 230, 85], name:"Cancel"}, ¬
  4.     {class:static text, bounds:[10, 10, 310, 10 + 32] ¬
  5.         , contents:"This dialog will timeout at " & ((current date) + 10)'s time string} ¬
  6.         ], timeout after:10}
  7.  
  8. if dVals's item 1 then
  9.     set msg to "The “OK” button was pressed."
  10. else if dVals's item 2 then
  11.     set msg to "The “Cancel” button was pressed."
  12. else
  13.     set msg to "The dialog timed-out."
  14. end if
  15.  
  16. dd auto dialog {size:[320, 95], contents:[¬
  17.     {class:push button, bounds:[250, 65, 310, 85], name:"OK"}, ¬
  18.     {class:static text, bounds:[10, 10, 310, 10 + 32], contents:msg} ¬
  19.         ]}