• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

[Request] Context Menu Organizer?

Scheduled Pinned Locked Moved Plugins
4 Posts 3 Posters 588 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.
  • F Offline
    flyashy
    last edited by 27 Nov 2009, 10:05

    Hi all,
    I recently discovered all those brilliant ☀ scripts you all kind peoples have made available here. So I'd like to thank you all for them.
    Okay, so I went a little overboard with them and installed virtually every script I hoped to use, and thus began my predicament, a virtually non-memorizable(is that even a word?) context menu. Since I'm a more of keyboard shortcut and right click kind of guy I don't particularly mind the plugins menu getting messed up too much but I'm a little possessive of my right click menu.
    Now i searched the forum and found out about the Organizer.rb by Rick W, but that script does not organize the context menu or am I wrong in that assumption?

    Also has anyone else written any other scripts around this issue? I don't know any ruby, tho am eager to try simpler(novice level) tweaking if I could get some help/guidance/pointers/tips.

    Thanks,
    flyashy

    1 Reply Last reply Reply Quote 0
    • C Offline
      Chris Fullmer
      last edited by 28 Nov 2009, 21:03

      Hi Flyashy, unfortunately there is no automated way to control the right click menu.

      But you definitely can go through and tweak your scripts so they don't load into the right click menu. But it really depends how the author has written their script. Some scripts are encoded, and you will not be able to get in and cnahge their code.

      But the other scripts you could. As a general rule, the menu stuff is all at the bottom of the script. Some scripts might load themselves into the right click menu with a single line of code. But others might do it in many lines of code. So you'll need to learn to read the code and decipher what each line is doing. But its definitely do-able if you are really eager to try.

      Chris

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

      1 Reply Last reply Reply Quote 0
      • R Offline
        RickW
        last edited by 29 Nov 2009, 06:40

        @flyashy said:

        Now i searched the forum and found out about the Organizer.rb by Rick W, but that script does not organize the context menu or am I wrong in that assumption?

        It's a complicated answer.

        The auto-editor built into Organizer does not change any context menu items. However, I think Organizer could possibly be tricked into organizing the context menu if authors coded their plugins correctly (or if end-users correctly modified existing context-menu-using scripts, but always have a backup in case you break something). I'll try to do some testing next week and report back with some results, but here's what I suspect might work:

        unless file_loaded?(__FILE__)
          file_loaded(__FILE__)
          UI.add_context_menu_handler do |menu|
            if $submenu
              unless $context_submenu && $context_submenu[0] == $submenu
                submenu = menu.add_submenu($submenu)
                $context_submenu = [$submenu, submenu]
              end
              submenu.add_item("menu item name") { action }
            else
              menu.add_item("menu item name") { action }
            end
          end
        end
        
        

        It's just a first blush, but anyone (with Organizer) could test the theory.

        RickW
        [www.smustard.com](http://www.smustard.com)

        1 Reply Last reply Reply Quote 0
        • F Offline
          flyashy
          last edited by 29 Nov 2009, 14:17

          Ah, thank you Chris & Rick,
          after reading your replies I did open up some rubies and tried to figure out what you said, and will give it a go, although I'm more likely to break things than mend them 😄
          But then, i always liked to take things apart to see what made them tick.
          Lesse 😄
          ta.

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

          Advertisement