Old 09-30-2017, 04:46 PM   #1
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 10,474
Default Smart toolbars

https://stash.reaper.fm/v/31743/Smart%20toolbar.lua





Main toolbar switch depending on mouse position

Made to use in combo with actions 41085 -> 41110 (press active toolbars buttons ...)


You have to click at least one time the toolbar to make it "active" after running the defer script


By default

trnasport -> main toolbar
item -> toolbar 1
ruler -> toolbar 2
envelope -> toolbar 3
tcp -> toolbar 4

Can be easily edited even for a poor scripter like me

Have fun!
__________________
http://www.residenceemilia.com

Last edited by Reno.thestraws; 09-30-2017 at 05:34 PM.
Reno.thestraws is offline   Reply With Quote
Old 09-30-2017, 04:53 PM   #2
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

very nice idea ! thank you
deeb is offline   Reply With Quote
Old 10-01-2017, 01:27 AM   #3
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 305
Default

It's interesting)

Thank you
Ivannn Bennnettt is offline   Reply With Quote
Old 10-01-2017, 10:39 AM   #4
sonicowl
Human being with feelings
 
sonicowl's Avatar
 
Join Date: Oct 2015
Posts: 739
Default

But how do I click on button on toolbar? If I move mouse, buttons change. Is there a way to "freeze" desired toolbar until mouse click?
sonicowl is offline   Reply With Quote
Old 10-01-2017, 10:41 AM   #5
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 10,474
Default

Quote:
Made to use in combo with actions 41085 -> 41110 (press active toolbars buttons ...)
or you can assign a key short cut to the script and choose the options "stop insteand of "new instance" when you launch it for the first time
__________________
http://www.residenceemilia.com
Reno.thestraws is offline   Reply With Quote
Old 10-01-2017, 10:48 AM   #6
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 10,474
Default

__________________
http://www.residenceemilia.com
Reno.thestraws is offline   Reply With Quote
Old 10-05-2017, 02:17 AM   #7
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Nice
IXix is offline   Reply With Quote
Old 10-05-2017, 12:27 PM   #8
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 10,474
Default

LAST UPDATE

Quote:
local r = reaper; local function nothing() end; local function bla() end

function act(id) r.Main_OnCommand(id, 0) end

_,_,_,_,_,_,val = r.get_action_context()


local function Main()
local window, segment, details = r.BR_GetMouseCursorContext()
--if window == 'ruler' then bla() return end
if window == 'midi_editor' then
act(41659) end -- MIDI toolbar 1
if segment == 'unknown' then
act(41659) end -- MIDI toolbar 1
if segment == 'ruler' then
act(41660) end -- MIDI toolbar 2
if segment == 'piano' then
act(41661) end -- MIDI toolbar 3
if segment == 'notes' then
act(41662) end -- MIDI toolbar 4
if segment == 'cc_lane' then
act(41956) end -- MIDI toolbar 5
if details == 'cc_selector' then
act(41957) end -- MIDI toolbar 6

if window == 'ruler' then
act(41105) end --Toolbar 1
if segment == 'region_lane' then
act(41106) end -- Toolbar 2
if segment == 'marker_lane' then
act(41107) end -- Toolbar 3
if segment == 'tempo_lane' then
act(41108) end -- Toolbar 4

if window == 'tcp' then
act(41647) end -- Toolbar 5


if window == 'mcp' then
act(41648) end -- Toolbar 6
if segment == 'empty' then
act(41649) end -- Toolbar 7

if details == 'empty' then
act(41650) end -- Toolbar 8

if details == 'item' then
act(41948) end -- Toolbar 9
if details == 'item_stretch_marker' then
act(41949) end -- Toolbar 10
if details == 'env_point' then
act(41950) end -- Toolbar 11
if details == 'env_segment' then
act(41950) end -- Toolbar 11
if segment == 'envelope' then
act(41950) end -- Toolbar 11
if window == 'unknown' then
act(41646) end --Main Toolbar
if window == 'transport' then
act(41646) end --Toolbar 12

r.defer(Main)
end
Main()
__________________
http://www.residenceemilia.com
Reno.thestraws is offline   Reply With Quote
Old 10-10-2017, 03:55 PM   #9
zookthespook
Human being with feelings
 
Join Date: Mar 2015
Location: India Mumbai
Posts: 816
Default

what dark juju is this !!! splendid work sir !
zookthespook is offline   Reply With Quote
Old 01-15-2018, 08:27 AM   #10
Vincent Sermonne
Petit manitou
 
Vincent Sermonne's Avatar
 
Join Date: Feb 2009
Location: Gémenos France
Posts: 7,347
Default

Brilliant !
__________________
Vincent
http://www.tchackpoum.fr
Vincent Sermonne is offline   Reply With Quote
Old 05-22-2022, 11:43 PM   #11
grandfougue
Human being with feelings
 
grandfougue's Avatar
 
Join Date: Sep 2016
Posts: 513
Default

I had not found the one thank you reno
Is there a way that it's still the main bar without having to click on it step?
grandfougue 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 01:56 AM.


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