Old 03-06-2010, 11:32 AM   #1
jedstar2000
Human being with feelings
 
jedstar2000's Avatar
 
Join Date: Apr 2009
Location: Bristol uk
Posts: 1,006
Default Shortfall with action id's in rescript

I just installed the latest fng actions and sws actions (thanks guys) and two my horror all my scripts using RPR_Main_OnCommand(actionnumber, 0) were messed up as all the action id's shuffled around.

Is there anyway to stop this happening in the future ?

Thx Jed
__________________
...............Reaper the DIY DAW.....................
MultiTrack Editing Macros http://forum.cockos.com/showthread.php?t=50111
Hybrid Theme http://forum.cockos.com/showthread.php?t=131090
jedstar2000 is offline   Reply With Quote
Old 03-06-2010, 12:34 PM   #2
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

YAY, looks like I can actually help someone in the dev forum!!! I'll mark this day with golden stars in my calendar

The problem is only with extension actions, inbuilt actions will keep their numbers. To reliably call extension actions from a script use RPR_NamedCommandLookup(custom ID) instead of the Cmd ID. You find the custom ID string in the column to the right of Cmd ID in the action list.

This (python) will call 'SWS set selected item to custom color 1'

Code:
SWS_ITEM_COLOR_1 = RPR_NamedCommandLookup('_SWS_ITEMCUSTCOL1')

RPR_Main_OnCommand(SWS_ITEM_COLOR_1, 0)
It's a two step thing. First you get the handle to the action with RPR_NamedCommandLookup and then call the action with RPR_Main_OnCommand

WIKI link (with examples): http://www.cockos.com/wiki/index.php...dCommandLookup

Last edited by gofer; 03-06-2010 at 12:48 PM.
gofer is offline   Reply With Quote
Old 03-06-2010, 04:24 PM   #3
jedstar2000
Human being with feelings
 
jedstar2000's Avatar
 
Join Date: Apr 2009
Location: Bristol uk
Posts: 1,006
Default

Wow thanks Gofer thats definitely going to save my bacon , it would be nice if someone edited the main rescript wiki page to reflect this so others don't fall for this one, thinking about it I haven't seen any posts from Mike in ages hope he's well
__________________
...............Reaper the DIY DAW.....................
MultiTrack Editing Macros http://forum.cockos.com/showthread.php?t=50111
Hybrid Theme http://forum.cockos.com/showthread.php?t=131090
jedstar2000 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 06:38 AM.


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