Temporary message box
- 
 I would like to load an informative message box, but take it down after a couple of seconds - without haging to wait for the user to click OK. I am going to see if I can do this with a timer, killing the timer thread. Has anyone done this already? 
- 
 Should be doable with a webdialog - since you then have methods to open and close those windows. 
- 
 Start and stop timer did not work as well as I had hoped: def temp_message $bdisp = true $id1 = UI.start_timer(1, false) { puts "A;" + $bdisp.to_s if $bdisp $bdisp = false puts "B;" + $bdisp.to_s UI.messagebox("test3" ) end#if } $id2 = UI.start_timer(2, false) { puts "STOP" UI.stop_timer($id1) } end#def
- 
 @thomthom said: Should be doable with a webdialog - since you then have methods to open and close those windows. Thanks, I'll have to try a web dialog, but I will wait a few hours to see if anyone already has one. 
- 
 @al hart said: @thomthom said: Should be doable with a webdialog - since you then have methods to open and close those windows. ... but I will wait a few hours to see if anyone already has one. Don't bother waiting.. you cannot use a messagebox. They are modal (and Ruby stops until they are closed.) Choice is a WebDialog, or if Win32 only, you can use Win32 API calls to create you own non-modal window. 
 ~
- 
 By "waiting", I meant that maybe someone already had a web dialog which did this and would upload it... (I can always hope!  ) )@dan rathbun said: Don't bother waiting.. you cannot use a messagebox. They are modal (and Ruby stops until they are closed.) Choice is a WebDialog, or if Win32 only, you can use Win32 API calls to create you own non-modal window. 
- 
 In the webdialog use this code: 
 <body onLoad="setTimeout('self.close()',5000)">
 with 5000 being the amount of milliseconds that the message is shownHaven't tried but should work 
Advertisement



 
                             
                             
                             
                             
                             
                             
                            