Old 06-22-2016, 10:37 PM   #1
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,986
Default (Beyond) Reaper and Button

(I posted this in the scrip forum but got no answer, so I am reposting it here and hope...)

A friend of mine created a system to manage song contests. He very successfully used Beyond Reaper to remote-control Reaper.

Now a step in the automated process includes to remove silence.

So he call the action "Auto trim / spit items (remove silence)" via Beyond and after that he moves the items in a way that the silence between them is deleted.

This works, but he needs to press the "process" button in the "Auto trim / spit items" Dialogue box by hand.

Now he searches a way to avoid the necessity to press the button or to remotely press the button via Beyond.

Any help ?

Thanks,
-Michael
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old 07-02-2016, 05:44 AM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,986
Default

Can anybody help with this issue ?

-Michael
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old 07-02-2016, 06:14 AM   #3
ACall231
Human being with feelings
 
ACall231's Avatar
 
Join Date: Apr 2016
Location: Maumee, OH
Posts: 21
Default

From the script call Command ID => 40315.
ACall231 is offline   Reply With Quote
Old 07-02-2016, 11:04 AM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,986
Default

Thanks a lot. I'll forward the tip and let you know if it works.
-Michael
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old 07-02-2016, 01:03 PM   #5
ACall231
Human being with feelings
 
ACall231's Avatar
 
Join Date: Apr 2016
Location: Maumee, OH
Posts: 21
Default

If the scripting language is LUA, the call would be:

reaper.Main_OnCommand(40315,0)

Regards...Archie
ACall231 is offline   Reply With Quote
Old 07-04-2016, 03:09 AM   #6
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,986
Default

Quote:
Originally Posted by ACall231 View Post
From the script call Command ID => 40315.
This action already is used successfully.

But when calling the action from the script, a Dialogue is shown the values in which already are preset by the script but it still needs pressing the OK (or run or similar) button manually.

This is what needs to be avoided, as this is an application that runs free without any user interaction.

In fact similar issues will arrive with other user-less running application we are planning.

Any further ideas ?
-Michael
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old 12-13-2017, 01:05 PM   #7
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 1,405
Default

Yes, AutoHotkey can press on any key you want in any window or control. It would wait in the background, if something appears it should trigger, it could wait some security time, let us say 2s, then pressing that button. AutoHotkey runs in Windows and wine, so no problem doing all in linux as well.
TonE is offline   Reply With Quote
Old 12-13-2017, 02:39 PM   #8
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,986
Default

I don't suppose AutoHotkey can be triggered via network.

AFAIK, he did solve the problem (at least he did not ask more questions on that behalf).

-Michael
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old 12-13-2017, 02:51 PM   #9
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 1,405
Default

You do not have to trigger anything, it will trigger itself.
TonE is offline   Reply With Quote
Old 12-14-2017, 07:21 PM   #10
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 193
Default

Quote:
Originally Posted by ACall231 View Post
From the script call Command ID => 40315.
Is there a list that shows these Command ID's?
tXShooter is offline   Reply With Quote
Old 12-14-2017, 07:24 PM   #11
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,251
Default

Quote:
Originally Posted by tXShooter View Post
Is there a list that shows these Command ID's?
Right click in the action list and enable "Show action ID".
cfillion is offline   Reply With Quote
Old 12-14-2017, 10:59 PM   #12
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,986
Default

Quote:
Originally Posted by TonE View Post
You do not have to trigger anything, it will trigger itself.
Ah ! I see: it well "see" the window and "press" the button. Correct ?

-Michael
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old 12-29-2017, 02:37 PM   #13
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 193
Default

Quote:
Originally Posted by cfillion View Post
Right click in the action list and enable "Show action ID".
How would one implement a Command ID from AutoHotKey that is a custom action?

For example, I created a custom action that results in an Command ID: _11b6e22e7a1f72468b2b411c9f16de08
tXShooter is offline   Reply With Quote
Old 12-29-2017, 03:15 PM   #14
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,172
Default

Quote:
Originally Posted by tXShooter View Post
How would one implement a Command ID from AutoHotKey that is a custom action?

For example, I created a custom action that results in an Command ID: _11b6e22e7a1f72468b2b411c9f16de08
You can use reaper.NamedCommandLookup( command_name )

https://www.extremraym.com/cloud/rea...dCommandLookup

Something like this:
Code:
commandId = reaper.NamedCommandLookup("_11b6e22e7a1f72468b2b411c9f16de08")
reaper.Main_OnCommand(commandId,0)
or as a one-liner
Code:
reaper.Main_OnCommand(reaper.NamedCommandLookup("_11b6e22e7a1f72468b2b411c9f16de08"),0)

Last edited by nofish; 12-29-2017 at 03:22 PM.
nofish is offline   Reply With Quote
Old 12-30-2017, 03:44 PM   #15
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 193
Default

Quote:
Originally Posted by nofish View Post
Code:
commandId = reaper.NamedCommandLookup("_11b6e22e7a1f72468b2b411c9f16de08")
reaper.Main_OnCommand(commandId,0)
I think I'm using it incorrectly as nothing happens when I execute that code in my AHK Script...
Code:
reaperProcessAudioStep1()
{
	WinActivate, ahk_class REAPERwnd
	Sleep, 1000
	commandId = reaper.NamedCommandLookup("_11b6e22e7a1f72468b2b411c9f16de08")
	reaper.Main_OnCommand(commandId,0)
	Sleep, 3000
	return
}
tXShooter is offline   Reply With Quote
Old 12-30-2017, 06:06 PM   #16
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,251
Default

Quote:
Originally Posted by tXShooter View Post
I think I'm using it incorrectly as nothing happens when I execute that code in my AHK Script...
It's a Lua snippet to be run from a script inside REAPER. You could run NamedCommandLookup to get the current command ID for the custom action then put that ID in the AHK Script. But it will likely break at some point because the numeric ID is not guaranteed to remain the same next time REAPER is started.

https://forum.cockos.com/showthread.php?p=1913777
cfillion is offline   Reply With Quote
Old 12-30-2017, 07:19 PM   #17
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,172
Default

Sorry, I missed that this is meant for use inside an AHK script.
nofish 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:11 AM.


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