• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

UI.messagebox "beep"

Scheduled Pinned Locked Moved Developers' Forum
20 Posts 5 Posters 979 Views
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.
  • T Offline
    thomthom
    last edited by 20 Sept 2010, 12:45

    What would probably make it easier to map out was to print out the binary value so we can see which bits are turned on.

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

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 20 Sept 2010, 12:46

      32.to_s(2) 100000 48.to_s(2) 110000 64.to_s(2) 1000000 80.to_s(2) 1010000 272.to_s(2) 100010000

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

      1 Reply Last reply Reply Quote 0
      • H Offline
        honoluludesktop
        last edited by 20 Sept 2010, 12:50

        How do I "add some constant value" to the following?
        UI:messagebox "my text "+variable, MB_OK

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 20 Sept 2010, 12:51

          Use the bitwise And operator to combine flags:
          Messagebox with Yes/No button and question mark icon:
          UI.messagebox('Hello World', MB_YESNO | 32)

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

          1 Reply Last reply Reply Quote 0
          • H Offline
            honoluludesktop
            last edited by 20 Sept 2010, 12:58

            WOW


            temp04.jpg

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 20 Sept 2010, 12:58

              The Win32 API docs helped:

              http://msdn.microsoft.com/en-us/library/ms645505%28VS.85%29.aspx

              Stop: 0x00000010 = 16
              Question: 0x00000020 = 32
              Explaination (Yellow Alert Triangle): 0x00000030 = 48
              Information (Blue Info Circle): 0x00000040 = 64

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

              1 Reply Last reply Reply Quote 0
              • T Offline
                thomthom
                last edited by 20 Sept 2010, 13:02

                [16,32,48,64,80].each { |i| puts i.to_s(2).rjust(8,'0') } 00010000 00100000 00110000 01000000 01010000

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

                1 Reply Last reply Reply Quote 0
                • D Offline
                  Dan Rathbun
                  last edited by 21 Sept 2010, 07:01

                  I went thru this a fee months ago or so:

                  It's a Win only thing so far as I know, but I'd like to see what happens on the Mac.

                  Here's a text report of all the integers and the resultant button styles you get. (I believe some of the icons are deprected, specifically the question icon.)

                  UI_messagebox.txt

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    RunnerPack
                    last edited by 23 Sept 2010, 18:40

                    @thomthom said:

                    Use the bitwise And operator to combine flags:
                    Messagebox with Yes/No button and question mark icon:
                    UI.messagebox('Hello World', MB_YESNO | 32)

                    That's actually the Or operator... but you knew that πŸ˜‰

                    Sorry... pedantic mode, off! πŸ˜„

                    @Dan: I've also always wondered what all the obviously-Win32-API-based things did on the Mac version... I always assumed they just translated stuff to the appropriate Mac system-calls/constants, but it would be nice to know for sure.

                    You might have noticed... I'm a bit of a ferpectionist.

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      thomthom
                      last edited by 23 Sept 2010, 18:46

                      @runnerpack said:

                      @thomthom said:

                      Use the bitwise And operator to combine flags:
                      Messagebox with Yes/No button and question mark icon:
                      UI.messagebox('Hello World', MB_YESNO | 32)

                      That's actually the Or operator... but you knew that πŸ˜‰

                      Doh! 😳 I swear there's a little brain-gnome that intercepts and swaps words before they reach the hands...

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

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

                      Advertisement