Not sure how relevant it is, but I touched on doing a command line argument in a post of mine awhile ago.

See if any of this is useful:...