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

    Toogle Dialogs via Ruby?

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 4 Posters 624 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.
    • thomthomT Offline
      thomthom
      last edited by

      Can one activate the command Toogle Dialogs with Ruby? More specifically, can one turn on/off?

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

      1 Reply Last reply Reply Quote 0
      • A Offline
        alz
        last edited by

        The only one I know of is:

        Sketchup.send_action 21926
        
        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Ok - that's toggle. Thanks. And is there any way to know if they are hidden or not?

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

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            Do those send actions work on Macs?

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

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

              @thomthom said:

              Ok - that's toggle.

              aka (Menu) Windows > Show / Hide Dialogs

              @thomthom said:

              ... And is there any way to know if they are hidden or not?

              You CAN get whether the USER has each one set to be shown or hidden thru the registry.
              Ex:
              Sketchup.read_default('SnappyComponents','show',0)==1 ? true : false
              and also whether it's RolledUp or not
              Sketchup.read_default('SnappyComponents','Minimized',0)==1 ? true : false

              EDIT: Nevermind read_default (doesn't work) use the standard Ruby Registry module. Seems Sketchup.read_default cannot handle (or does not return by design,) DWord values in the Registry.
              EDIT2: Fixed: the 'show' attributes are all downcase.

              IF attribute 'Show' is 0, the dialog is hidden no matter what the (global) "Show/Hide Dialogs" toggle setting is.
              IF the dialog is 'rolled-up', AND shown (on screen) it's 'Minimized' attribute is 1 AND 'show' is 1.
              When you close the 'Minimized' dialog, it's attributes are 'Minimized'=1 and 'show'=0.
              When a closed 'Minimized' dialog is re-shown (Same session, or new session,) the 'Minimized' attribute is changed to 0 because Sketchup auto-unrolls it, and the 'show' attribute = 1.

              But I cannot find a way to know (cross-platform) whether the (Show/Hide Dialogs) Menu item is checked or not. Of course we can do it using Win32API call. When the dialogs are globally Hidden their 'Show' registry attributes remain unchanged, and the Show/Hide toggle is reset (all dialogs are shown per registry settings,) when you reopen Sketchup.

              I'm not here much anymore.

              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