|
|
|
11-27-2021, 06:50 AM
|
#1
|
Human being with feelings
Join Date: Sep 2018
Posts: 73
|
Combining actions from different sections
I'm trying to call some actions from the main section when in the media explorer. Is this possible?
Here's what I'm trying to do:
When browsing the media explorer I want to insert an item at the play position, so I can effectively play the item and insert it at the play cursor with a keystroke. But there is no action in the media explorer section to move the edit cursor to the play cursor, so either I make my own script for that or there is a way to call an action from the main section when in the explorer.
Hope it makes sense!
|
|
|
11-27-2021, 08:35 AM
|
#2
|
Human being with feelings
Join Date: Sep 2016
Location: Toronto
Posts: 744
|
Sending a command from Main to Media Explorer in LUA:
Code:
me = reaper.JS_Window_Find("Media Explorer", true)
reaper.JS_WindowMessage_Send(me, "WM_COMMAND", 40064, 0, 0, 0)
Sending a command from Media explorer to Main in PYTHON:
Code:
SWS_ITEM_COLOR_1 = RPR_NamedCommandLookup('_RSaad5165bbc3c416b661dbd27d71fdc9acca10b9b')
RPR_Main_OnCommand(SWS_ITEM_COLOR_1, 0)
|
|
|
11-30-2021, 11:01 AM
|
#3
|
Human being with feelings
Join Date: Sep 2018
Posts: 73
|
Quote:
Originally Posted by Arthur McArthur
Sending a command from Main to Media Explorer in LUA:
Code:
me = reaper.JS_Window_Find("Media Explorer", true)
reaper.JS_WindowMessage_Send(me, "WM_COMMAND", 40064, 0, 0, 0)
Sending a command from Media explorer to Main in PYTHON:
Code:
SWS_ITEM_COLOR_1 = RPR_NamedCommandLookup('_RSaad5165bbc3c416b661dbd27d71fdc9acca10b9b')
RPR_Main_OnCommand(SWS_ITEM_COLOR_1, 0)
|
Thanks for the response! however I'm quite a noob on this, how would I use the LUA one? Make a new script in the media explorer and paste the action ID somewhere in that code?
|
|
|
11-30-2021, 11:11 AM
|
#4
|
Human being with feelings
Join Date: Dec 2012
Posts: 13,333
|
Quote:
Originally Posted by bamsehopp
Thanks for the response! however I'm quite a noob on this, how would I use the LUA one? Make a new script in the media explorer and paste the action ID somewhere in that code?
|
Exactly!
|
|
|
11-30-2021, 11:11 AM
|
#5
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,612
|
Probably by replacing RPR_ with reaper. if I remember correctly.
But I never did Python.
|
|
|
11-30-2021, 11:30 AM
|
#6
|
Human being with feelings
Join Date: Sep 2018
Posts: 73
|
I got it working! I found the reaper.Main_OnCommandEx(COMMAND-ID, 1, 0) action and used it to paste the action id in there! But alas when I put that script in a custom action it doesn't work anyway, probably because the script executes slower than the native action...
this is what I want:
1. Script: moving the edit cursor to the play cursor
2. Insert media item (at play cursor)
but it just inserts to wherever the edit cursor is .. :/
|
|
|
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 06:35 PM.
|