sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Temporary message box

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 4 Posters 436 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Al HartA Offline
      Al Hart
      last edited by

      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?

      Al Hart

      http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
      IRender nXt from Render Plus

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Should be doable with a webdialog - since you then have methods to open and close those windows.

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • Al HartA Offline
          Al Hart
          last edited by

          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
          

          Al Hart

          http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
          IRender nXt from Render Plus

          1 Reply Last reply Reply Quote 0
          • Al HartA Offline
            Al Hart
            last edited by

            @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

            http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
            IRender nXt from Render Plus

            1 Reply Last reply Reply Quote 0
            • Dan RathbunD Offline
              Dan Rathbun
              last edited by

              @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.
              ~

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • Al HartA Offline
                Al Hart
                last edited by

                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.

                Al Hart

                http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                IRender nXt from Render Plus

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Pout
                  last edited by

                  In the webdialog use this code:
                  <body onLoad="setTimeout('self.close()',5000)">
                  with 5000 being the amount of milliseconds that the message is shown

                  Haven't tried but should work

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement