Thank you all for the feedback! Certainly learned an important lesson about local and global variables today.
I finally found time to test out your script ZaellixA, which looks like exactly what I need, however I keep getting hit with the following error message despite my debugging attempts:
'...ePlayer", "76561198090900291"];
this |#|addAction["Buy STANAG mag $100","purchas...'
Error Type code, expected String
Any thoughts?