Posted 01 April 2015 - 07:58 PM
Well, I browsed my old files on my HDD, and I found a really old utility I made.
All it does is "parse" the arguments you give a program, and allow you to access them easier.
Here is the link: http://pastebin.com/zb5JMzbb
Using my utility, you don't have to make complicated "help pages", to explain what argument is at what position.
For example
All it does is "parse" the arguments you give a program, and allow you to access them easier.
Here is the link: http://pastebin.com/zb5JMzbb
Using my utility, you don't have to make complicated "help pages", to explain what argument is at what position.
For example
rednetSend 1 2 Hello
could become
rednetSend -from 1 -to 2 -message Hello
or
rednetSend -to 2 -message Hello -from 1
Usage
local cliAPI = dofile("cli")
local cli = cliAPI.new({...})
cli:parse()
print(cli:getString("from"))
print(cli:getString("to"))
print(cli:getString("message"))
Edited on 01 April 2015 - 05:58 PM