Old 08-26-2018, 08:07 AM   #1
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 1,117
Default Script: Dropdown menu

The script is attached.

This is script inspired by the user reddiesel41264 https://forum.cockos.com/showthread.php?t=193401

It takes any Reaper's native menu or toolbar and shows it as a dropdown menu.



To show another menu than attached Floating MIDI toolbar 2, you just duplicate the file "bfo_Toolbar_dropdown - Floating MIDI toolbar 2.lua", rename it as you wish, and inside the file, change the menuName variable to the name of the toolbar you wish to show.



If someone would like to take if further, e.g. to ReaPack or to enhance it, feel free.
Attached Files
File Type: lua bfo_Toolbar dropdown - Floating MIDI toolbar 2.lua (790 Bytes, 215 views)
File Type: lua bfo_Toolbar dropdown - functions.lua (3.5 KB, 214 views)
__________________
Donations | Mixing & Mastering Services

Last edited by bFooz; 01-12-2019 at 02:08 PM.
bFooz is online now   Reply With Quote
Old 08-26-2018, 10:45 AM   #2
Regisfofo
Human being with feelings
 
Regisfofo's Avatar
 
Join Date: Mar 2017
Location: France
Posts: 232
Default

wow, that seems helpful!

thanks a lot for sharing!
Regisfofo is offline   Reply With Quote
Old 08-26-2018, 12:43 PM   #3
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,442
Default

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.
Edgemeal is offline   Reply With Quote
Old 09-01-2018, 11:13 AM   #4
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 402
Default

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
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 09-01-2018, 12:36 PM   #5
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 776
Default

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
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB
Thonex is offline   Reply With Quote
Old 09-01-2018, 03:53 PM   #6
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,442
Default

Quote:
Originally Posted by woodslanding View Post
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.
Edgemeal is offline   Reply With Quote
Old 09-01-2018, 09:29 PM   #7
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 402
Default

oh, cool, thanks. Thought I could get it to work with the fx menu, but that's not a customizable menu
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 09-03-2018, 12:59 PM   #8
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 1,117
Default

Quote:
Originally Posted by woodslanding View Post
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.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 09-03-2018, 01:01 PM   #9
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 1,117
Default

Quote:
Originally Posted by Thonex View Post
I also like your blue back-lit icons. Where did you get those?
It's RADO V4 theme.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 09-04-2018, 07:15 AM   #10
zookthespook
Human being with feelings
 
Join Date: Mar 2015
Posts: 569
Default

This is so so good @
thank you for this
zookthespook is offline   Reply With Quote
Old 01-12-2019, 02:25 AM   #11
Vagelis
Human being with feelings
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 335
Default

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.
Vagelis is offline   Reply With Quote
Old 01-12-2019, 03:12 AM   #12
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 1,117
Default

Quote:
Originally Posted by Vagelis View Post
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.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 01-12-2019, 04:46 AM   #13
Vagelis
Human being with feelings
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 335
Default

I see thank you,anyway this is still useful as it is.
Vagelis is offline   Reply With Quote
Old 01-12-2019, 10:45 AM   #14
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 7,343
Default

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.

Coachz is offline   Reply With Quote
Old 01-12-2019, 11:17 AM   #15
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,442
Default

Quote:
Originally Posted by Coachz View Post
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"
Edgemeal is offline   Reply With Quote
Old 01-12-2019, 12:38 PM   #16
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 7,343
Default

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 ?

Coachz is offline   Reply With Quote
Old 01-12-2019, 01:05 PM   #17
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,442
Default

Quote:
Originally Posted by Coachz View Post
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!
Edgemeal is offline   Reply With Quote
Old 01-12-2019, 01:26 PM   #18
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 7,343
Default

Thanks, I can't see me using it if I have to run the script every session to get the dropdown to populate though. :-(
Coachz is offline   Reply With Quote
Old 01-12-2019, 02:05 PM   #19
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 1,117
Default

Quote:
Originally Posted by Coachz View Post
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.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 01-12-2019, 02:40 PM   #20
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 7,343
Default

I see. Thank you for clarifying.
Coachz is offline   Reply With Quote
Old 09-28-2019, 04:40 AM   #21
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,477
Default

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!
heda is offline   Reply With Quote
Old 09-28-2019, 05:32 AM   #22
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 1,117
Default

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.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 10-27-2019, 10:08 AM   #23
strachupl
Human being with feelings
 
strachupl's Avatar
 
Join Date: Jan 2013
Posts: 413
Default

Hi. Is it possible to make dropdown menu with acrions/scripts listed instead of toolbar content?
__________________
The truth is not in the middle but exactly where it is.
strachupl is offline   Reply With Quote
Old 10-27-2019, 11:11 AM   #24
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 1,117
Default

This would be easily possible, but is not implemented in this script.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 11-04-2019, 02:32 PM   #25
kudlatiy
Human being with feelings
 
Join Date: Jul 2015
Posts: 41
Default

thanks a lot! super needed feature
kudlatiy is offline   Reply With Quote
Old 11-04-2019, 02:39 PM   #26
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,351
Default

Quote:
Originally Posted by bFooz View Post
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.
Lokasenna is online now   Reply With Quote
Old 11-10-2019, 03:48 AM   #27
Vagelis
Human being with feelings
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 335
Default

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
Vagelis is offline   Reply With Quote
Old 11-10-2019, 06:55 AM   #28
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 1,117
Default

Quote:
Originally Posted by Vagelis View Post
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.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 11-13-2019, 03:42 AM   #29
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 286
Default

Quote:
Originally Posted by Vagelis View Post
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
Ivannn Bennnettt is offline   Reply With Quote
Old 11-13-2019, 04:02 AM   #30
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 1,117
Default

Quote:
Originally Posted by Ivannn Bennnettt View Post
Most of these are not being displayed in menus. There are some characters however that are being displayed and can be usefull, for example

↖ ↗ ‖ ★ ▶ ➜

__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 11-13-2019, 09:21 AM   #31
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 286
Default

Quote:
Originally Posted by bFooz View Post
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
Ivannn Bennnettt is offline   Reply With Quote
Old 11-13-2019, 09:23 AM   #32
Vagelis
Human being with feelings
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 335
Default

Thanks, I had no idea about Unicode. But where should I add it to show up?
Vagelis is offline   Reply With Quote
Old 11-13-2019, 09:26 AM   #33
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 1,117
Default

I just find a character on web and copy-paste it into Reaper.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 11-13-2019, 09:33 AM   #34
Vagelis
Human being with feelings
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 335
Default

Nice I will check that out.
Vagelis is offline   Reply With Quote
Old 11-13-2019, 09:37 AM   #35
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 286
Default

and one more http://decodeunicode.org/en/u+1D122
Ivannn Bennnettt is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.