Old 10-25-2015, 04:10 PM   #1
Angus_C
Human being with feelings
 
Join Date: Oct 2015
Location: London
Posts: 6
Default reaper_www and custom actions

Hi,

I was using the web plugin with custom actions a while back - creating buttons on the webpage and getting the command IDs from reaper. I've come back to revisit this and I now understand that the way command IDs are assigned to custom actions has been changed and that at run time the NamedCommandLookup function can be used to get the ID.

Before I dust off my (long forgotten) coding skills, has anyone updated the plugin to work with custom actions and be willing to share it?

Angus.
Angus_C is offline   Reply With Quote
Old 11-04-2015, 01:13 PM   #2
Angus_C
Human being with feelings
 
Join Date: Oct 2015
Location: London
Posts: 6
Default

Well, it took me a week just to get the plugin to compile on OS X. By that I mean it basically took me a week to discover all I needed to do was use Xcode!

From there it was a pretty simple code change to implement custom IDs.

Am happy to make my updates available if anyone else wants it.

Or is there a repository somewhere for these updates?

Angus.
Angus_C is offline   Reply With Quote
Old 12-21-2016, 07:36 PM   #3
aeldude
Human being with feelings
 
Join Date: Aug 2016
Posts: 14
Default

I would love to know this as well if you (or anyone else) would care to share.
aeldude is offline   Reply With Quote
Old 12-21-2016, 08:58 PM   #4
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

The new web interface that is included in reaper_csurf as of 5.30 supports custom actions, via the /_/_actionidstring request (and it is otherwise compatible with the classic reaper_www)
Justin is offline   Reply With Quote
Old 12-22-2016, 01:03 PM   #5
aeldude
Human being with feelings
 
Join Date: Aug 2016
Posts: 14
Default

Really appreciate the response sir! I finally got it working. I wasn't using single quotes around the command, silly me.

Last edited by aeldude; 02-05-2017 at 05:36 PM.
aeldude is offline   Reply With Quote
Old 03-01-2017, 12:02 PM   #6
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

For example in order to call native action 40084, one should write:
onClick="wwr_req(40084)"

If I want to call custom action "_0a1510e85d2e2b4d8b01d5a2ddbf4e91", what should I write?
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 03-01-2017, 01:52 PM   #7
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

@amagalma
wwr_req('_0a1510e85d2e2b4d8b01d5a2ddbf4e91')
cfillion is offline   Reply With Quote
Old 03-01-2017, 04:43 PM   #8
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Thank you cfillion!

I haven't thought to use ' ' instead of " " ! :/
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 03-01-2017, 10:36 PM   #9
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

It works with double quotes too: in Javascript both are the same. It's just a style preference.
cfillion is offline   Reply With Quote
Old 03-02-2017, 03:30 AM   #10
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Strange! Because I did try with " " and it didn't work...
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma 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 10:32 AM.


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