[Request] Context Menu Organizer?
-
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 -
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
-
@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.
-
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.
Advertisement