Here's the code for the python script I'm using contstantly (thank you timlloyd)
Code:
from reaper_python import *
import os
def msg(m):
RPR_ShowConsoleMsg(str(m) + "\n")
actions_file = os.path.join(RPR_GetResourcePath(), 'Action', 'Main_Section.txt')
actions = {}
for line in open(actions_file, 'r'):
line = line.split(' ')
actions[line[0]] = [line[1], line[2]]
usr_input = RPR_GetUserInputs('', 1, 'Action Centre!', '', 32)[4].replace(' ','').lower()
if usr_input in actions:
action = actions[usr_input]
RPR_Main_OnCommand(int(action[0]), 0)
else:
RPR_MB("Check your spelling", 'Action Undefined!', 0)
Could somebody tell me what to append in order that I can just hit the escape key and not get the "Action undefined!" message? Just a clean escape?