Simple applescript to pass on commands
I need a very simple Applescript that will allow me to pass on commands as arguments from the command line.
What I'm ultimately needing is to connect HDPVRCapture to my ZephIR blaster. HDPVRCapture can easily be configured to control any IR Blaster that can be controlled from the command line and ZephIR can easily be controlled using Applescript.
To change the channel directly, you simply (this is an example from their website) --
tell application "ZephIR"
fire zephir command "3" of component "ComCast Cable DCT 7001"
fire zephir command "4" of component "ComCast Cable DCT 7001"
fire zephir command "5" of component "ComCast Cable DCT 7001"
fire zephir command "enter" of component "ComCast Cable DCT 7001"
end tell
What I'm needing is a script that will accept channels as a command line argument as opposed to hard coding.
i.e. -- a script that does the "fire zephir command" and the "of component abc" but where the actual command comes from the argument attached when the script is run from the command line.
I'm sure this is a stupid question and I'll probably kick myself with how easy it ends up being, but for the life of me I'm stuck.
Any help would be greatly appreciated,
Thank you very much in advance.
OS X Mountain Lion (10.8.4)