Message Boards Message Boards

0
|
5275 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Automatically close a dialog box (after 30 sec)?

Posted 8 years ago

I am trying to keep the user updated about the what is going on in the code and for that purpose I use dialog boxes such as

CreateDialog[Style["Initilization complete"]];

but after a 30 sec or so I would like to be able to close the window automatically. Is that possible?

POSTED BY: Erdem Uguz
2 Replies
Posted 8 years ago

Working like a charm.Thank you David.

POSTED BY: Erdem Uguz

Using ScheduledTasks can accomplish this... here is just one example (with 10 seconds so you don't have to wait too long to see it work):

Module[{nb},
 nb = CreateDialog[Style["Initilization complete"]]; 
 RunScheduledTask[NotebookClose[nb], {1}, AbsoluteTime[Date[] + {0, 0, 0, 0, 0, 10}]]
 ]
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract