Old 04-23-2015, 02:24 AM   #1
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default Mouse position dependant actions (contextual actions) eel

Hi!
Thanks to Breeder and its genius work, I worked on a template to make any Mouse Position Dependant Action.

WARNING : REAPER 5 only and need the last beta of SWS extensions!

Example :

"contextual group"

if mouse is over an item -> the triggered action will be "group selected items

if mouse is over the tcp -> the triggered action will be "set track grouping parameters"

if mouse is over an empty area of track -> "ungroup selected items"

How it works?

Here's the template code

Code:
// Call BR_GetMouseCursorContext API from SWS to get current details for stuff under mouse cursor
extension_api("BR_GetMouseCursorContext", #window, #segment, #details, 128);

// If mouse is over TCP track, execute this
!strcmp(#window, "tcp") && !strcmp(#segment, "track") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over empty tcp, execute this
: !strcmp(#window, "tcp") && !strcmp(#segment, "empty") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0); 
)
// If mouse is over ECP , execute this
: !strcmp(#window, "tcp") && !strcmp(#segment, "envelope") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over region lane , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "region_lane") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over Marker lane , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "marker_lane") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over Tempo lane , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "tempo_lane") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over Timeline , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "timeline") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over Transport , execute this
: !strcmp(#window, "Transport") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over MCP Track , execute this
: !strcmp(#window, "mcp") && !strcmp(#segment, "track") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
) 
// If mouse is over MCP Track , execute this
: !strcmp(#window, "mcp") && !strcmp(#segment, "empty") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over arrange empty, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "empty") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over an item, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "item") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over an item stretch marker, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "item_stretch_marker") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over an envelope point in the track lane, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "env_point") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over an envelope segment in the track lane, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "env_segment") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over an empty envelope, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "envelope") && !strcmp(#details, "empty") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over an envelope point, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "envelope") && !strcmp(#details, "env_point") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over an envelope segment, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "envelope") && !strcmp(#details, "env_segment") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over an empty arrange area, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "empty")  ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over MIDI Editor Ruler, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "ruler")  ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over MIDI Editor Piano, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "piano")  ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over MIDI Editor Notes, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "notes")  ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over MIDI CC selector, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "cc_lane") && !strcmp(#details, "cc_selector") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over MIDI CC lane, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "cc_lane") && !strcmp(#details, "cc_lane") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
At the moment the code just trigger the same two actions over every contexts.

1) no-op no action
2) SWS left mouse click at mouse position

So it does nothing

But you can edit as your heart content!

How to create you own script?

-Open action list and click "new reascript"

-Name and save your file as "BLABLA.eel"

-Copy paste the code in the reascript window and Edit.

How to edit? :

Notice that 2 lines at every context :

Code:
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
For triggering any native action, select the action in your action list -> right click -> copy selected action command ID

and paste the ID to replace 65535

For triggering any sws action
select the action in your action list -> right click -> copy selected action command ID

and paste the ID to replace _S&M_MOUSE_L_CLICK

For triggerind any MIDI editor action, you need to replace the "Main_OnCommand" by "MIDIEditor_LastFocused_OnCommand"

You can trigger as many actions as you want to make macros inside a context.

Example :

Code:
Main_OnCommand(65535, 0);
Main_OnCommand(65535, 0);
Main_OnCommand(65535, 0);
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
Enjoy!


All credits goes to Breeder and I thank him as much as possible for his work!
Reno.thestraws is online now   Reply With Quote
Old 04-23-2015, 06:34 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,924
Default

Nice to have put all these variables together

It's a good script template, with nice comments.
I wonder what nice "group actions scripts" will be created with that :P

Cheers :P
X-Raym is offline   Reply With Quote
Old 04-23-2015, 06:43 AM   #3
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default

I play with this since yesterday and it's amazing

conditional split!
love it!

It would be even more awesome if we could have a second layer of mouse context

example :
item and time selection
item and no time selection

item upper half
item bottom half

arrange-envelope-segment- time selection
arrange-envelope-segment- no time selection
Reno.thestraws is online now   Reply With Quote
Old 04-23-2015, 07:15 AM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,924
Default

Quote:
It would be even more awesome if we could have a second layer of mouse context
Time selection and loop selection seem possible.

Code:
GetSet_LoopTimeRange(bool isSet, bool isLoop, &startOut, &endOut, bool allowautoseek)
X-Raym is offline   Reply With Quote
Old 04-23-2015, 07:22 AM   #5
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,113
Default

Time selection argument can get handled right now...all you have to do is get mouse position from SWS mouse functions and compare it with current time selection.

You could put this code after calling BR_GetMouseCursorContext and before checking window/segment/details string to use overTimeSel variable as one more condition for those comparisons:
Code:
overTimeSel = 0;

// Get time selection info
GetSet_LoopTimeRange2(0, 0, 0, tStart, tEnd, 0);
(tStart != tEnd) ?
(
    mousePos = extension_api("BR_GetMouseCursorContext_Position"); // call this only after calling BR_GetMouseCursorContext to obtain data for current mouse position
    mousePos >= tStart && mouseMpos <= tEnd ? overTimeSel = 1;
);

// And test it...
overTimeSel ? ShowConsoleMsg("over time selection\n") : ShowConsoleMsg("not over time selection\n");
Upper and bottom part of the item require updates to SWS API to expose that information.
__________________
My contributions
Breeder is offline   Reply With Quote
Old 04-23-2015, 07:29 AM   #6
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default

@ breeder :
it works! I see the message box over or not over

now I have to find how to use this to make alternate actions for the same context...
Reno.thestraws is online now   Reply With Quote
Old 04-26-2015, 07:20 AM   #7
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default

Ok, here's a brand new template, now you can have more options considering time selection

As an exemple you can have

- mouse over item AND time selection

- mouse over item and outside time selection

It's freaking amazing!

I have two contextual action yet coded and it's a game changer

Contextual split!
Contextual delete (you delete what you are pointing)

here's the blank template

Code:
Undo_BeginBlock();

// Call BR_GetMouseCursorContext API from SWS to get current details for stuff under mouse cursor
extension_api("BR_GetMouseCursorContext", #window, #segment, #details, 128);
overTimeSel = 0;

// Get time selection info
GetSet_LoopTimeRange2(0, 0, 0, tStart, tEnd, 0);
(tStart != tEnd) ?
(
    mousePos = extension_api("BR_GetMouseCursorContext_Position"); // call this only after calling BR_GetMouseCursorContext to obtain data for current mouse position
    mousePos >= tStart && mousePos <= tEnd ? overTimeSel = 1;
);


// If mouse is over TCP track, execute this
!strcmp(#window, "tcp") && !strcmp(#segment, "track") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over empty tcp, execute this
: !strcmp(#window, "tcp") && !strcmp(#segment, "empty") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0); 
)
// If mouse is over ECP , execute this
: !strcmp(#window, "tcp") && !strcmp(#segment, "envelope") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over region lane , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "region_lane") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over Marker lane , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "marker_lane") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over Tempo lane , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "tempo_lane") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)

// If mouse is over Timeline , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "timeline") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over Transport , execute this
: !strcmp(#window, "Transport") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)
// If mouse is over MCP Track , execute this
: !strcmp(#window, "mcp") && !strcmp(#segment, "track") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
) 
// If mouse is over MCP Empty , execute this
: !strcmp(#window, "mcp") && !strcmp(#segment, "empty") ?
(
  Main_OnCommand(65535, 0);
  Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0);
)

// If mouse is over arrange empty, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "empty") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over an item, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "item") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over an item stretch marker, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "item_stretch_marker") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over an envelope point in the track lane, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "env_point") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over an envelope segment in the track lane, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "env_segment") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over an empty envelope, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "envelope") && !strcmp(#details, "empty") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over an envelope point, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "envelope") && !strcmp(#details, "env_point") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over an envelope segment, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "envelope") && !strcmp(#details, "env_segment") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over an empty arrange area, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "empty")  ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

/// MIDI ////////////////////////////////////////////////////


// If mouse is over MIDI Editor Ruler, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "ruler")  ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over MIDI Editor Piano, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "piano")  ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over MIDI Editor Notes, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "notes")  ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over MIDI CC selector, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "cc_lane") && !strcmp(#details, "cc_selector") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
)

// If mouse is over MIDI CC lane, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "cc_lane") && !strcmp(#details, "cc_lane") ?
(
overTimeSel ? 
// Over time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) :
// Outside time Selection
Main_OnCommand(65535, 0)
+ Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CLICK"), 0) ;
);
UpdateArrange();
Undo_EndBlock("Contextual Template", 0);
Reno.thestraws is online now   Reply With Quote
Old 05-25-2015, 03:31 AM   #8
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default

Hi Everyone!
How hard could it be to make a dedicated window for this via the SWS extension?

Something very simple

Just a window containing a tab

1) you add a line

Column 1 : you give a name

Column 2 -> 55 : each existing and possible context (tcp, item, item + time selection, ecp, envelope point,...)


Now you can click on any box to open an action/ macro editor and drag or copy actions from actions list (same as cycle action editor)

click save and the brand new contextual action is now in the action list

?


The more I use this script, the more I find the contextual action AWESOME

- contextual split
- contextual delete (you delete what you're pointing)
- contextual "add" (ad track if over tcp, add item if over arrange view, add an env point, add a marker,...
- contextual play or rec
- contextual copy, cut, duplicate
- ...
Reno.thestraws is online now   Reply With Quote
Old 06-07-2015, 11:19 AM   #9
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 1,488
Default

Wow!! Merci beaucoup Reno!!

So useful! Using your template I created a contextual toggle zoom tool!
Over TCP -> toggles maximum zoom and hides other tracks
Over ECP -> toggles maximum lane height (needs a cycle action)
Over an item -> toggles zoom to item under cursor

To use, import the cycle action and note its number in your system. Then open the .txt file and find the cycle action and change its number to the one of your system and save the file with an .eel extension.

Voilà!
Attached Files
File Type: ini Toggle envelope height to maximum.ini (223 Bytes, 123 views)
File Type: txt Contextual zoom.txt (8.4 KB, 125 views)
amagalma is offline   Reply With Quote
Old 06-07-2015, 11:25 AM   #10
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default



glad you like it
Reno.thestraws is online now   Reply With Quote
Old 06-09-2015, 07:38 AM   #11
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 1,488
Default

Quote:
Originally Posted by Reno.thestraws View Post
Hi Everyone!
How hard could it be to make a dedicated window for this via the SWS extension?

Something very simple

Just a window containing a tab

1) you add a line

Column 1 : you give a name

Column 2 -> 55 : each existing and possible context (tcp, item, item + time selection, ecp, envelope point,...)


Now you can click on any box to open an action/ macro editor and drag or copy actions from actions list (same as cycle action editor)

click save and the brand new contextual action is now in the action list

?


The more I use this script, the more I find the contextual action AWESOME

- contextual split
- contextual delete (you delete what you're pointing)
- contextual "add" (ad track if over tcp, add item if over arrange view, add an env point, add a marker,...
- contextual play or rec
- contextual copy, cut, duplicate
- ...

I agree! There is enormous amount of possibilities here! A dedicated window like the Contextual Toolbars window, would be so useful!!!

Or alternatively we could have, let's say, 10 contextual actions. The window would be similar to the Contextual Toolbars window and the Cycle Actions window, where one could define which action he/she wants under a certain context. And then we need some new actions like: "run contextual action #1" etc

What do you think? Breeder? Do you like the idea? Do you have the time and will to code it for SWS?
amagalma is offline   Reply With Quote
Old 06-09-2015, 10:27 AM   #12
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,113
Default

Quote:
Originally Posted by amagalma View Post
What do you think? Breeder? Do you like the idea? Do you have the time and will to code it for SWS?
I don't need it and I really don't have much time. However, if all interested parties decided to donate (to me personally) enough for the cause, I might do it. If you're interested, let me know and I'll create kickstarter campaign. Don't take this the wrong way guys, but I have lots of real life obligations and I just can't justify coding something this size (which I personally don't need) for free.
__________________
My contributions

Last edited by Breeder; 06-09-2015 at 10:33 AM.
Breeder is offline   Reply With Quote
Old 06-09-2015, 10:31 AM   #13
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default

How much is enough?
Reno.thestraws is online now   Reply With Quote
Old 06-09-2015, 10:43 AM   #14
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,113
Default

Quote:
Originally Posted by Reno.thestraws View Post
How much is enough?
I have no idea, I guess if you get 30 or more people to fund each with 10 bucks I would consider this ok. I would be able to start in 20 days and I think I could do it in a week. If you think this is fair, I will create kickstarter campaign.
__________________
My contributions
Breeder is offline   Reply With Quote
Old 06-09-2015, 11:11 AM   #15
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default

It might be doable to have 30 people

Last edited by Reno.thestraws; 06-09-2015 at 12:27 PM.
Reno.thestraws is online now   Reply With Quote
Old 06-11-2015, 10:22 AM   #16
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 1,488
Default

Quote:
Originally Posted by Breeder View Post
I don't need it and I really don't have much time. However, if all interested parties decided to donate (to me personally) enough for the cause, I might do it. If you're interested, let me know and I'll create kickstarter campaign. Don't take this the wrong way guys, but I have lots of real life obligations and I just can't justify coding something this size (which I personally don't need) for free.
Don't worry Breeder, we don't take it the wrong way and it is perfectly understandable! I could donate $10 too for the project, but I don't know if we could get 30 people for this... because the project would offer an easier and faster way to set up what Reno.thestraws has already offered.. And anyway, it is something to set once and forget.. So, maybe there is not such a big need for this.

@Reno.thestraws: is it possible to make it work in v4?
amagalma is offline   Reply With Quote
Old 06-11-2015, 10:23 AM   #17
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default

Quote:
@Reno.thestraws: is it possible to make it work in v4?
Nope.
Reno.thestraws is online now   Reply With Quote
Old 06-11-2015, 10:50 AM   #18
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,113
Default

Quote:
Originally Posted by amagalma View Post
@Reno.thestraws: is it possible to make it work in v4?
It actually is if you're using python But python is quite slower (it seems slowness comes from the fact that it takes longer time to parse .py script, interpret it and compile it. EEL and Lua do it soooo much faster. I've actually rewritten all of my personal scripts to use Lua and EEL and the difference is staggering)


Btw...I told this to Reno on our GitHub already but worth mentioning again. I find ReaScript is much more powerful than native SWS solution because you can do so much more with it - you can know which track, item, take is at mouse cursor, at what time...and then you can use that data to manipulate stuff in a more advanced way.

Yes, I know a lot of people don't have the time to learn to code but you can always ask on the forum for help, tons of people can and will offer you advice and write a script for you

I'll look into crowdfunding when I catch some time (it seems kickstarter doesn't allow all EU countries). If I get enough support, I'll give it a go.
__________________
My contributions
Breeder is offline   Reply With Quote
Old 06-11-2015, 11:00 AM   #19
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default

Quote:
I find ReaScript is much more powerful than native SWS solution because you can do so much more with it - you can know which track, item, take is at mouse cursor, at what time...and then you can use that data to manipulate stuff in a more advanced way.
80% of REAPER user DON'T know how to create a script from scratch.
50% don't even know how to install it.

SWS is the best way to make things useful for people

I recently made a video tutorial about COnditions in CAE because, a lot of people, found them difficult to understand.

So a script....
Reno.thestraws is online now   Reply With Quote
Old 06-11-2015, 11:13 AM   #20
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,113
Default

Quote:
Originally Posted by Reno.thestraws View Post
So a script....
I'm a bit biased these days, but unfortunately I do agree with you (that's why I said people could request stuff on the forums...but a lot of REAPER users don't actively partake on the forums, so that makes you right again)

I remember when I first started ReaScript with Python - it was really hard and there were zero resources to actually guide you. It took me a long time to actually finish my first script and it wasn't even made from scratch but pieced together. And I actually love coding and find it rewarding. So I can only imagine how hard it can be for someone who lacks the interest for code.
__________________
My contributions
Breeder is offline   Reply With Quote
Old 06-15-2015, 11:23 PM   #21
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 530
Default

Thank you Reno and Breeder, very useful, i have done a intuitive setup for editing.
Sumalc is offline   Reply With Quote
Old 06-19-2015, 02:34 PM   #22
foxAsteria
Human being with feelings
 
foxAsteria's Avatar
 
Join Date: Dec 2009
Location: Oblivion
Posts: 6,715
Default

this is amazing work, guys, thanks! so many actions can now be reduced to single shortcuts. one problem: should this work for mousewheel actions? can't seem to make anything happen.

One more question: any way to have separate contexts on child tracks vs parent tracks?

I'm also running into problems calling other eel scripts from inside this one. Should that be possible?
__________________
Myy Wyyrd Muzyyk

Last edited by foxAsteria; 07-16-2015 at 03:12 PM.
foxAsteria is offline   Reply With Quote
Old 07-18-2015, 01:28 PM   #23
foxAsteria
Human being with feelings
 
foxAsteria's Avatar
 
Join Date: Dec 2009
Location: Oblivion
Posts: 6,715
Default

*bump*
Can we call an EEL script from inside another EEL script? How?
__________________
Myy Wyyrd Muzyyk
foxAsteria is offline   Reply With Quote
Old 07-19-2015, 01:05 AM   #24
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,496
Default

Quote:
Originally Posted by foxAsteria View Post
*bump*
Can we call an EEL script from inside another EEL script? How?
Not possible at the moment:

Edit: This is what Jeffos posted:

Quote:
Originally Posted by Jeffos View Post

About ReaScripts calling other ReaScripts: I can confirm this won't work (unless ran from the IDE, indeed), because there's a very strict recursion test about that ATM.
So this script A calling script B won't work:
Code:
cmd = NamedCommandLookup("_88696ecdd7464b6c9d54d65e071cfa5b"); // cmd id of script B
Main_OnCommand(cmd, 0);
To make it work you can do this though:
Code:
cmd = NamedCommandLookup("_88696ecdd7464b6c9d54d65e071cfa5b"); // cmd id of script B
defer("Main_OnCommand(cmd, 0);");
HTH.
(I haven't tested the latter way)

Last edited by spk77; 07-19-2015 at 05:26 AM.
spk77 is offline   Reply With Quote
Old 07-23-2015, 04:20 PM   #25
Pasajeromoronmoreno
Human being with feelings
 
Join Date: Nov 2013
Location: Argentina
Posts: 325
Default

Thanks for this Reno.thestraws! It´s an amazing feature! a little hard to setup, but totally worth it. This script, with a GUI, really belongs to sws i think. It´s too good... Other thing, there is a solution to the impossibility of mouse wheel actions assignments in the script? and happens the same with customs actions i think. kind of broken. Maybe? anyways, thanks again!!
__________________
Living la vida loca
Pasajeromoronmoreno is offline   Reply With Quote
Old 08-01-2015, 01:46 PM   #26
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,676
Default Update

here's a new version of the template

https://stash.reaper.fm/v/24740/Conte...20-%20Reno.eel

I use 4 functions for faster editing

-Launching a native action (Main section) :

action(CommandID)

-Launching an extension action (Main section)

sws("CommandID")

-Launching a Native action (MIDI section)

midi(CommandID)

-Launching an extension action (MIDI section)

midisws("CommandID")


Don't forget to assign your keyboard shortcut to the "pass trough key to main window" in the MIDI editor action list for full working



This thing is, imho, a game changer

you can completly redifine your worflow


Just a little trick

You can use the scripts in the marvelous jeffos Cycle action editor, so you can make to scripts for the same key and make a conditional cycle of it

Exemple

IF
DUMMY TOGGLE 01
My Mouse dependant script 1
ELSE
My Mouse dependant script 2
END


a single complete script can run 38 actions

so with condition cycle

you can have 38 x 2 actions with one single shortcut

and even a lot more by using exclusive toggles...
Reno.thestraws is online now   Reply With Quote
Old 11-03-2015, 02:59 AM   #27
Sju
Human being with feelings
 
Join Date: Jun 2015
Posts: 686
Default

Sweet! I found myself wanting a context-specific function for mousewheel, like for example adjusting envelope points' values or item volume or track zoom etc. I think I should be able to hack something together using this, so thank you!

By the way, it would be great to have the SWS extension to include a section where you could specify context-specific actions (both normal and MIDI/CC), like you can with the toolbars.

Cheers
Sju is offline   Reply With Quote
Old 12-01-2015, 11:35 AM   #28
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Location: Sholder, Kentucky
Posts: 1,889
Default

not to hijack, but i'm looking for similar functionality that isn't mouse-dependent, but rather screen focus-dependent...

ie: if focus [specific screen], then [action]

does anyone have any leads or suggestions for this type of lewd behavior?
mccrabney is offline   Reply With Quote
Old 12-15-2015, 06:53 PM   #29
Pasajeromoronmoreno
Human being with feelings
 
Join Date: Nov 2013
Location: Argentina
Posts: 325
Default

Hi Reno! i'm trying to add take functionality (mostly for my "contextual delete") to this wonderful script, but sadly i barely understand lua, and eel it's above my head for now. I manage to create this (in lua) to differentiate between item context and take context, but i can't manage the translation to eel, or how to implement this in the script. This is what i mean.





And here it's the lua code. (it's functional, you can load it)
Code:
window, segment, details = reaper.BR_GetMouseCursorContext() -- get mouse context
  	 if details == "item"  then -- if item is found
	 tr = reaper.BR_GetMouseCursorContext_Track() --get track 
	 it = reaper.BR_GetMouseCursorContext_Item() -- get item  
         tkn = reaper.CountTakes(it) -- count takes in item 
    	 if tkn > 1 then -- if number of takes is greater than one then
	     deltake = reaper.NamedCommandLookup("_BR_DELETE_TAKE_MOUSE", 0) 
	     reaper.Main_OnCommandEx(deltake, 0, 0) -- delete take under cursor (sws)
	     else     
	     reaper.DeleteTrackMediaItem(tr, it) -- delete item
	     reaper.UpdateArrange()
	     end
end
If you can help me to put this in, i will be very grateful, even more than now.
Either way, thanks again for this marvelous script, it's incredible useful.
__________________
Living la vida loca

Last edited by Pasajeromoronmoreno; 12-16-2015 at 03:56 AM.
Pasajeromoronmoreno is offline   Reply With Quote
Old 12-13-2018, 10:46 AM   #30
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 526
Default

Raising this from a few years ago

Is there any way for a script to know if the mouse is over a midi item or an audio item?

I have double click on an item set to sws rename takes and source file. If its a midi item I'd like to open the midi editor. Is this possible?

Cheers
__________________
Brush and Beater Drums Online: www.outoftheboxdrums.co.uk
Triode is online now   Reply With Quote
Old 12-13-2018, 01:33 PM   #31
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,255
Default

Quote:
Originally Posted by Triode View Post
I have double click on an item set to sws rename takes and source file. If its a midi item I'd like to open the midi editor. Is this possible?
Calling this script from the doubleclick item modifier seems to work OK, try it.

Code:
if reaper.GetCursorContext() == 1 then -- 1=item
  item = reaper.GetSelectedMediaItem(0, 0)   
  take = reaper.GetActiveTake(item)
  if reaper.TakeIsMIDI(take) then -- Item: Open in built-in MIDI editor
    reaper.Main_OnCommand(40153,0)
  else  -- Xenakios/SWS: Rename takes and source files
    reaper.Main_OnCommand(reaper.NamedCommandLookup('_XENAKIOS_RENMTAKEANDSOURCE'), 0)
  end
end
GetCursorContext() shouldn't be needed if called from mediaitem doubleclick modifier.

Last edited by Edgemeal; 12-13-2018 at 01:47 PM.
Edgemeal is offline   Reply With Quote
Old 12-13-2018, 02:06 PM   #32
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 526
Default

Hi Edgemeal

That was quick many thanks. I'll give that a try

In parallel, I googled down some code snippets and put together this and it works also:

Code:
local item = reaper.GetSelectedMediaItem(0,0)
    if item == nil then return end
    
    i_pos = reaper.GetMediaItemInfo_Value( item, 'D_POSITION' )
    i_len = reaper.GetMediaItemInfo_Value( item, 'D_LENGTH' )
    take =  reaper.GetActiveTake( item )
if reaper.TakeIsMIDI( take ) then 

reaper.Main_OnCommand(reaper.NamedCommandLookup('40153'),0)

else

reaper.Main_OnCommand(reaper.NamedCommandLookup('_XENAKIOS_RENMTAKEANDSOURCE'),0)

end

I'll use yours as I've a non-coder's hunch my one has spurious stuff in.

I'm constantly amazed how reaper will bend to workflow so effectively
__________________
Brush and Beater Drums Online: www.outoftheboxdrums.co.uk
Triode is online now   Reply With Quote
Old 08-07-2019, 12:55 PM   #33
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 7,112
Default

Any ideas why Mouse_position_dependant_actions.eel broke for me in the latest Reaper versions ?

I am running delete envelope points action id 40333 for one example. Below is my script. Thanks in advance. Bad Reaper for breaking things !
reaper5981+dev0724_x64-install.exe works
reaper5981+dev0801_x64-install.exe and later does not

// Call BR_GetMouseCursorContext API from SWS to get current details for stuff under mouse cursor
extension_api("BR_GetMouseCursorContext", #window, #segment, #details, 128);

// If mouse is over TCP track, execute this
!strcmp(#window, "tcp") && !strcmp(#segment, "track") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over empty tcp, execute this
: !strcmp(#window, "tcp") && !strcmp(#segment, "empty") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over ECP , execute this
: !strcmp(#window, "tcp") && !strcmp(#segment, "envelope") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over region lane , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "region_lane") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over Marker lane , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "marker_lane") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over Tempo lane , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "tempo_lane") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over Timeline , execute this
: !strcmp(#window, "ruler") && !strcmp(#segment, "timeline") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over Transport , execute this
: !strcmp(#window, "Transport") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over MCP Track , execute this
: !strcmp(#window, "mcp") && !strcmp(#segment, "track") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over MCP Track , execute this
: !strcmp(#window, "mcp") && !strcmp(#segment, "empty") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over arrange empty, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "empty") ?
(
Main_OnCommand(40006, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over an item, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "item") ?
(
Main_OnCommand(40006, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over an item stretch marker, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "item_stretch_marker") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over an envelope point in the track lane, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "env_point") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over an envelope segment in the track lane, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "track") && !strcmp(#details, "env_segment") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over an empty envelope, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "envelope") && !strcmp(#details, "empty") ?
(
Main_OnCommand(40333, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over an envelope point, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "envelope") && !strcmp(#details, "env_point") ?
(
Main_OnCommand(40333, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over an envelope segment, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "envelope") && !strcmp(#details, "env_segment") ?
(
Main_OnCommand(40333, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over an empty arrange area, execute this
: !strcmp(#window, "arrange") && !strcmp(#segment, "empty") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over MIDI Editor Ruler, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "ruler") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over MIDI Editor Piano, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "piano") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over MIDI Editor Notes, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "notes") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over MIDI CC selector, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "cc_lane") && !strcmp(#details, "cc_selector") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
// If mouse is over MIDI CC lane, execute this
: !strcmp(#window, "midi_editor") && !strcmp(#segment, "cc_lane") && !strcmp(#details, "cc_lane") ?
(
Main_OnCommand(65535, 0);
Main_OnCommand(NamedCommandLookup("_S&M_MOUSE_L_CL ICK"), 0);
)
Attached Files
File Type: rpp ztemp3.rpp (14.3 KB, 1 views)

Last edited by Coachz; 08-08-2019 at 08:48 AM.
Coachz is offline   Reply With Quote
Old 08-07-2019, 01:06 PM   #34
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,078
Default

How is it broken? An error? Doing the wrong thing? Doing nothing?
Lokasenna is offline   Reply With Quote
Old 08-07-2019, 01:35 PM   #35
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 7,112
Default

Quote:
Originally Posted by Lokasenna View Post
How is it broken? An error? Doing the wrong thing? Doing nothing?
It does nothing
Coachz is offline   Reply With Quote
Old 08-07-2019, 02:22 PM   #36
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,924
Default

The SWS Get Mouse functions is broken with last REAPER pre-release.


It is a pre-release issue, not related to this script. The script has nothing to change.



Justin commit an update to SWS for next reaper release.
X-Raym is offline   Reply With Quote
Old 08-07-2019, 03:10 PM   #37
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 7,112
Default

Quote:
Originally Posted by X-Raym View Post
The SWS Get Mouse functions is broken with last REAPER pre-release.


It is a pre-release issue, not related to this script. The script has nothing to change.



Justin commit an update to SWS for next reaper release.
Fantastic. Thanks so much for the great info !
Coachz 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 03:56 AM.


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