Old 02-26-2021, 09:51 PM   #1
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 2,232
Default way to see what custom actions use a script?

is there any way to see if a script is in use within custom actions? sometimes i'd like to update or delete a script but can't remember if it's in use someplace.

thanks,
babag
babag is offline   Reply With Quote
Old 02-27-2021, 07:11 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

Yes, by analyzing the reaper-kb.ini

https://mespotin.uber.space/Ultrasch...#Reaper-kb.ini
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-27-2021, 07:36 AM   #3
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,071
Default

It would also be nice if you could go to a script in the actions window from a toolbar button to see what the button is attached to. With text icons it's impossible to tell, or is there a way to do that ?
J Reverb is offline   Reply With Quote
Old 02-27-2021, 08:59 AM   #4
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

https://mespotin.uber.space/Ultrasch...eaper-menu.ini

This file has the bindings of toolbar-buttons stored.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-27-2021, 02:05 PM   #5
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 2,232
Default

thanks meo-ada! very helpful but let me make sure i grasp this before i do something dumb.

it looks like, if i copy a script's command id from the actions list window and paste that into my search field in a text editor with the kb.ini file open, it should tell me which actions are using that command id and, therefore, that script.

the way i can tell is that the search will highlight the command id when it finds it and i can then look to see if ACT is at the left of the entry, which would indicate that the command id is a part of an action. SCR would only indicate the script itself.

knowing that the script is not in use in any custom actions would mean that i could delete the script without accidentally damaging something else i've built that makes use of it.

does this sound right? about to start deleting and rearranging things and wanted to be sure.

thanks again, so much. very helpful,
babag
babag is offline   Reply With Quote
Old 02-28-2021, 11:24 PM   #6
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 2,232
Default

i'm using reaper on linux so this is how i'm trying to make things work. there's probably a way to get this output to a console inside reaper but i have no idea how to do it.

i make a copy of the reaper-kb.ini file someplace and call it reaper-kb_COPY.ini.

i copy the command id of the file i need to find out whether it's been used in any custom actions.

i type the following into a terminal:
Code:
awk '/paste_the_copied_command_id_between_these_slashes/{print "Line    "NR" =    " $4 "    " $5 " " $6 }' reaper-kb_COPY.ini > Custom_Actions_that_use_Source_Script.txt
a text file is created and named:
Custom_Actions_that_use_Source_Script.txt

the text file contains output like this:
Code:
Line    473 =    "command_id_1"    "Custom: REPLACE_WITH_1000ms"
Line    591 =    "command_id_2"    "Custom: PASTE_AT_CURSOR_wRIPPLE_1000ms"
Line    668 =    "command_id_3"    "Custom: REMOVE_AND_FILL_PAUSES_WITH_TONE_wXFADE"
Line    680 =    "command_id_4"    "Custom: ADD_LEADERS"
"LINE 473" means the first custom action found that uses the source file is found at line 473 of the kb.ini file for reference.
"Command_id_1" is the command id for the custom action.
"Custom: REPLACE_WITH_1000ms" is the name of the custom action.

"Line 591" is the line in the kb.ini file where the second custom action is found.
etc.
etc.

thanks,
babag

Last edited by babag; 02-28-2021 at 11:32 PM.
babag 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 04:08 PM.


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