Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 05-25-2017, 12:10 AM   #1
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default Misc: Pass through key to main window for ME

Hello.

I've just thinked about this awesome action for Media Explorer. It would be really useful to play/pause and do other activities through ME.
vitalker is offline   Reply With Quote
Old 05-31-2017, 09:48 AM   #2
me2beats
Human being with feelings
 
me2beats's Avatar
 
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
Default

It's easy to make this via scripts
for example here is lua script for inserting new track:
Code:
reaper.Main_OnCommand(40001,0)
__________________
My Reapack Repo
Donation
me2beats is offline   Reply With Quote
Old 05-31-2017, 09:54 AM   #3
me2beats
Human being with feelings
 
me2beats's Avatar
 
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
Default

But yeah it's better to have also "Pass through key to main window" action in Media Editor section. And "Pass through key to section A" in section B - is much better
__________________
My Reapack Repo
Donation
me2beats is offline   Reply With Quote
Old 09-29-2017, 12:12 AM   #4
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Bump.
vitalker is offline   Reply With Quote
Old 10-05-2017, 07:17 AM   #5
me2beats
Human being with feelings
 
me2beats's Avatar
 
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
Default

For a while you can write 1-line scripts in Media Explorer section, the code looks like this:
reaper.Main_OnCommand(actio_id,0)
__________________
My Reapack Repo
Donation
me2beats is offline   Reply With Quote
Old 10-05-2017, 10:54 AM   #6
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Quote:
Originally Posted by me2beats View Post
For a while you can write 1-line scripts in Media Explorer section, the code looks like this:
reaper.Main_OnCommand(actio_id,0)
And that's all? How to use it, Albert?
vitalker is offline   Reply With Quote
Old 10-05-2017, 07:50 PM   #7
me2beats
Human being with feelings
 
me2beats's Avatar
 
Join Date: Jul 2015
Location: Yekaterinburg, Russia
Posts: 400
Default

For example: Play stop.lua

Action list -> Media Explorer section --> Reascript New.
After you specify new script name 'Play stop.lua',
Reascript Development Environment window opens (Script editor window).
You can just copy-paste
Code:
Main_OnCommand(40044,0)
here (into that window), then save the script (Ctrl+S - for save and run, Ctrl+Shift+S - for only save).
And that's all.
Just find this script in action list and assign it to Space key.
__________________
My Reapack Repo
Donation
me2beats is offline   Reply With Quote
Old 10-06-2017, 01:09 AM   #8
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Quote:
Originally Posted by me2beats View Post
Just find this script in action list and assign it to Space key.
Thanks a lot!
vitalker is offline   Reply With Quote
Old 04-05-2020, 12:11 PM   #9
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,875
Default

Sorry for bumping an old thread but I tried to set this up and got "Play stop.lua:1: attempt to call a nil value (global 'Main_OnCommand')". Can someone help?
Phazma is offline   Reply With Quote
Old 04-05-2020, 12:39 PM   #10
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,856
Default

Quote:
Originally Posted by Phazma View Post
Sorry for bumping an old thread but I tried to set this up and got "Play stop.lua:1: attempt to call a nil value (global 'Main_OnCommand')". Can someone help?
The full code line is:
Code:
reaper.Main_OnCommand(40044,0)
__________________
ReaLauncher
solger is offline   Reply With Quote
Old 04-05-2020, 01:46 PM   #11
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,875
Default

Ok thanks! Does not help me do what I wanted but technically it works.
Phazma is offline   Reply With Quote
Old 04-06-2020, 03:35 AM   #12
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,856
Default

Quote:
Originally Posted by Phazma View Post
Ok thanks! Does not help me do what I wanted but technically it works.
Can you post more details about what you're trying to do, exactly?

Depending on the use-case, it could be that there are now other options or scripts available.
__________________
ReaLauncher
solger is offline   Reply With Quote
Old 04-06-2020, 04:27 AM   #13
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,875
Default

Basically when I insert something from the media explorer, close the media explorer and press play nothing happens. I need to first click somewhere inside the main window and afterwards I can play.
I thought that this happens because for some reason the media explorer remains in focus (even though not visible) until I manually focus the main window and so as a workaround I thought that with this method I could press play and it will play even if the main window has not yet been manually focused. However the script only works while the media explorer is actually visible/open. So it seems the issue lies somewhere else, perhaps when I close the media explorer no window is focused at all.

Same thing with my shortcut that opens and closes the media explorer. I can toggle it if I do not insert a media item, but as soon as I insert it, I need to click somewhere in the main window before I can again open the media explorer.

It isn't a big issue so I didn't want to bother anyone but if there is a fix it would be definitely cool.
Phazma 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:27 PM.


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