|
|
|
08-26-2018, 08:07 AM
|
#1
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Script: Dropdown menu
EDIT 2023-10-24
This script takes any Reaper's native menu or toolbar and shows it as a dropdown menu.
There are two script files attached in this post. The " ... - Main file" file is what tou are going to duplicate and modify depending on the toolbar you want to use.
How to:
- download the two files and load them into Reaper's action list
- open the " Customize menus/toolbars" window, find the toolbar you want to use as a dropdown and remember its name, e.g. "Floating MIDI toolbar 2". Here you can also rename the actions in the toolbar and that will be shown in the dropdown.
- duplicate the "... - Main file" script file, you may rename it for you convenience and load it as an action into Reaper's action list
- open the new duplicated file and on the top, change the variable menuName to the name of the toolbar. Save. e.g.
- now each time you run this action, the drop down menu is going to show up and you can run commands from it as you would expect.
- you can now assign this action to another toolbar as a button, so when you press the button, the dropdown will show up. You can rename this action and that will be shown as a button text.
Last edited by bFooz; 10-25-2023 at 12:49 AM.
|
|
|
08-26-2018, 10:45 AM
|
#2
|
Human being with feelings
Join Date: Mar 2017
Location: France
Posts: 627
|
wow, that seems helpful!
thanks a lot for sharing!
|
|
|
08-26-2018, 12:43 PM
|
#3
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Very Cool!
THANKS!
I think I found a minor bug.
In a menu the first two menu items for a toolbar I get is,
selected.png
item.png
Which seem to actually be the names of toolbar icons that have spaces in their name...
icon_23=toolbar_show selected.png
icon_28=toolbar_zoom_selected item.png
Not a big deal, I think I figured out how to filter out menu items I don't want by action # and names anyway.
Thanks again!
Last edited by Edgemeal; 08-26-2018 at 05:50 PM.
|
|
|
09-01-2018, 11:13 AM
|
#4
|
Human being with feelings
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
|
Hmm, when I run your floating midi toolbar I get:
bfo_Toolbar dropdown - functions.lua:44: bad argument #1 to 'find' (string expected, got nil)
Which is weird, because it looks like there are only 19 lines of code. Edit: I see, it's in find title in functions.Lua
What am I doing wrong? These licecaps make my head spin :P
|
|
|
09-01-2018, 12:36 PM
|
#5
|
Human being with feelings
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
|
Thanks bFooz,
Very handy!!! Thanks for doing this and sharing!!
I also like your blue back-lit icons. Where did you get those?
Thanks again.
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
|
|
|
09-01-2018, 03:53 PM
|
#6
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by woodslanding
Hmm, when I run your floating midi toolbar I get:
bfo_Toolbar dropdown - functions.lua:44: bad argument #1 to 'find' (string expected, got nil)
|
Not sure this helps but,
In a nut shell, The script can only work for toolbars that are in your 'reaper-menu.ini' file, and REAPER only adds toolbars to that ini file if you edit them (added buttons, etc).
So for example the posted script says,
menuName = "Floating MIDI toolbar 2"
If you never added anything to "MIDI 2" toolbar (a.k.a "Floating MIDI toolbar 2") then its not going to be found and script throws that error 44 message.
|
|
|
09-01-2018, 09:29 PM
|
#7
|
Human being with feelings
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
|
oh, cool, thanks. Thought I could get it to work with the fx menu, but that's not a customizable menu
|
|
|
09-03-2018, 12:59 PM
|
#8
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Quote:
Originally Posted by woodslanding
Hmm, when I run your floating midi toolbar I get:
bfo_Toolbar dropdown - functions.lua:44: bad argument #1 to 'find' (string expected, got nil)
|
I have uploaded the fixed version of "functions" file to the first post, please replace the old version with that one.
|
|
|
09-03-2018, 01:01 PM
|
#9
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Quote:
Originally Posted by Thonex
I also like your blue back-lit icons. Where did you get those?
|
It's RADO V4 theme.
|
|
|
09-04-2018, 07:15 AM
|
#10
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 816
|
This is so so good @
thank you for this
|
|
|
01-12-2019, 02:25 AM
|
#11
|
Human being with feelings
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
|
Nice one thanks!!
Is it possible to detect the icon when mouse is over with a script and change next or previous action from the toolbar with mousewheel?
Last edited by Vagelis; 01-12-2019 at 02:36 AM.
|
|
|
01-12-2019, 03:12 AM
|
#12
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Quote:
Originally Posted by Vagelis
Is it possible to detect the icon when mouse is over with a script and change next or previous action from the toolbar with mousewheel?
|
I don't see where the action would be changed. You always have to click at least two times in order to run an action from this. First time you click on a toolbar icon, which opens a menu, and the second time you click the menu item.
Regarding changing the toolbar button text or icon by a script, I haven't found a way to do this, probably not possible at the moment.
|
|
|
01-12-2019, 04:46 AM
|
#13
|
Human being with feelings
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
|
I see thank you,anyway this is still useful as it is.
|
|
|
01-12-2019, 10:45 AM
|
#14
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
I made a toolbar (toolbar 7) and then renamed the script and the
menuName = "Floating MIDI toolbar 7"
When I run the script I don't get a dropdown. Am I totally lost ? he he Thanks for any help.
|
|
|
01-12-2019, 11:17 AM
|
#15
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by Coachz
I made a toolbar (toolbar 7) and then renamed the script and the
menuName = "Floating MIDI toolbar 7"
When I run the script I don't get a dropdown. Am I totally lost ? he he Thanks for any help.
|
Been awhile since I tried that script but that doesn't look like a "MIDI toolbar", try,
menuName = "Floating toolbar 7"
|
|
|
01-12-2019, 12:38 PM
|
#16
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
You are right. So I got it working I think but I"m confused. I put buttons on the toolbar and then put a button pointing to the script. Is the intention to put the dropdown buttons on one toolbar and then put a button that runs this script on another toolbar ?
That would mean If I wanted a toolbar with 5 drop downs I'd have to use 5 other toolbars to make them ?
Also, do I have to manually run this everytime Reaper opens to get this ?
|
|
|
01-12-2019, 01:05 PM
|
#17
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by Coachz
You are right. So I got it working I think but I"m confused. I put buttons on the toolbar and then put a button pointing to the script. Is the intention to put the dropdown buttons on one toolbar and then put a button that runs this script on another toolbar ?
|
Well you'd call the script from say toolbar1 to show say toolbar5, Basically the script allows you to access toolbar actions from a different toolbar and displays their actions in a menu. I've unsub'd from this thread since I don't use this script, Good Luck!
|
|
|
01-12-2019, 01:26 PM
|
#18
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
Thanks, I can't see me using it if I have to run the script every session to get the dropdown to populate though. :-(
|
|
|
01-12-2019, 02:05 PM
|
#19
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Quote:
Originally Posted by Coachz
Is the intention to put the dropdown buttons on one toolbar and then put a button that runs this script on another toolbar ?
That would mean If I wanted a toolbar with 5 drop downs I'd have to use 5 other toolbars to make them ?
|
Yes, exactly. It would be completely possible to create custom menus though. Maybe try to ask in the script request forum if anyone would be into that. Pretty easy stuff to code.
Quote:
Also, do I have to manually run this everytime Reaper opens to get this ?
|
If you want to show the dropdown menu, you have to run the script manually, preferably by clicking the toolbar button assigned to it.
|
|
|
01-12-2019, 02:40 PM
|
#20
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
|
I see. Thank you for clarifying.
|
|
|
09-28-2019, 04:40 AM
|
#21
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Very nice bFooz
@Arthur McArthur told me about it https://forum.cockos.com/showpost.ph...postcount=1969
I think I can use this to display some custom menus in Track Inspector
Thank you!
|
|
|
09-28-2019, 05:32 AM
|
#22
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Thanks. Feel free.
I was thinking about expanding this to not only show the native menus, but to be able to create/read new custom menus. If you move into this direction and will think it is shareable as a standalone thing, let me know.
|
|
|
10-27-2019, 10:08 AM
|
#23
|
Human being with feelings
Join Date: Jan 2013
Posts: 648
|
Hi. Is it possible to make dropdown menu with acrions/scripts listed instead of toolbar content?
__________________
Love is patient and kind; love does not envy or boast; it is not arrogant or rude.
It does not insist on its own way; it is not irritable or resentful;
it does not rejoice at wrongdoing, but rejoices with the truth. Corinthians 13:4-6
|
|
|
10-27-2019, 11:11 AM
|
#24
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
This would be easily possible, but is not implemented in this script.
|
|
|
11-04-2019, 02:32 PM
|
#25
|
Human being with feelings
Join Date: Jul 2015
Posts: 54
|
thanks a lot! super needed feature
|
|
|
11-04-2019, 02:39 PM
|
#26
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Quote:
Originally Posted by bFooz
This would be easily possible, but is not implemented in this script.
|
If it helps, v3 of my GUI adds a module with functions to help with generating menus for gfx.showmenu and parsing the output, since it gets a little weird with subfolders or separators.
|
|
|
11-10-2019, 03:48 AM
|
#27
|
Human being with feelings
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
|
I love this script, I made a toolbar with different options for splitting-trimming the items.i d like to ask, would it be possible to show the icons from the toolbar in the dropdownmenu? That would be awesome
|
|
|
11-10-2019, 06:55 AM
|
#28
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Quote:
Originally Posted by Vagelis
would it be possible to show the icons from the toolbar in the dropdownmenu? That would be awesome
|
Not at the moment. The current API does not allow that.
|
|
|
11-13-2019, 03:42 AM
|
#29
|
Human being with feelings
Join Date: Feb 2017
Posts: 305
|
Quote:
Originally Posted by Vagelis
I love this script, I made a toolbar with different options for splitting-trimming the items.i d like to ask, would it be possible to show the icons from the toolbar in the dropdownmenu? That would be awesome
|
but you could use a unicode http://xahlee.info/comp/unicode_emoticons.html
|
|
|
11-13-2019, 04:02 AM
|
#30
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Quote:
Originally Posted by Ivannn Bennnettt
|
Most of these are not being displayed in menus. There are some characters however that are being displayed and can be usefull, for example
↖ ↗ ‖ ★ ▶ ➜
|
|
|
11-13-2019, 09:21 AM
|
#31
|
Human being with feelings
Join Date: Feb 2017
Posts: 305
|
Quote:
Originally Posted by bFooz
Most of these are not being displayed in menus.
|
Yep, I thought it's only I have. It needs to dig.
I've found another one http://charbase.com/block/dingbats
|
|
|
11-13-2019, 09:23 AM
|
#32
|
Human being with feelings
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
|
Thanks, I had no idea about Unicode. But where should I add it to show up?
|
|
|
11-13-2019, 09:26 AM
|
#33
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
I just find a character on web and copy-paste it into Reaper.
|
|
|
11-13-2019, 09:33 AM
|
#34
|
Human being with feelings
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
|
Nice I will check that out.
|
|
|
11-13-2019, 09:37 AM
|
#35
|
Human being with feelings
Join Date: Feb 2017
Posts: 305
|
|
|
|
12-02-2019, 08:33 AM
|
#36
|
Human being with feelings
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
|
I'd like to ask if it is possible to toggle open/close the dropdown menu when i click the toolbar button or assign it to a key. It would be even more useful thanks!
|
|
|
12-02-2019, 09:25 AM
|
#37
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Quote:
Originally Posted by Vagelis
I'd like to ask if it is possible to toggle open/close the dropdown menu when i click the toolbar button or assign it to a key. It would be even more useful thanks!
|
To toggle probably not.
The script uses this function https://www.extremraym.com/cloud/rea...a_gfx.showmenu which invokes the standard OS menu, which hides itself when it detects a user input. I can't think of a straightforward way to hide it programatically.
To assign it to a key yes, you can do it the same way as with any ohter action in the in the action window.
|
|
|
12-02-2019, 09:41 AM
|
#38
|
Human being with feelings
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,797
|
Ahh i see, i was hoping if it would be possible since i'm using it a lot, but that's a small thing compared to the usability it offers.
|
|
|
12-02-2019, 10:23 AM
|
#39
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
The dropdown also pauses the script while it's open, so the script can't close it.
|
|
|
12-16-2019, 08:45 AM
|
#40
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
thanks a whole lot, bFooz, the script is bananas, simplifies quite a few things
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 02:20 PM.
|