Posted 18 February 2013 - 12:43 AM
Title: API Loader Program
Hi, I'm a bit new to programming and ComputerCraft in general, and need a bit of help making a program that loads an API after the name of such API is entered; I have just tried writing this program so I can load the "Sensors" API for OpenCC Sensors, and possibly other APIs if need be so I can load each API quickly without making an individual program to load each API, therefore cutting out massive amounts of code. I wanted an interface that read: "Please enter the name of the API you wish to add." (I know how to use print("text string" already.) and then the console read the text and insert it into the next piece of code:"os.loadAPI("ocs/apis/<API>")" where <API> was the name of the API I wished to load,API.i.e. the sensor API.
I've looked through countless wiki pages but still have no idea; any suggestions would be welcome. Thank you for your time.
Hi, I'm a bit new to programming and ComputerCraft in general, and need a bit of help making a program that loads an API after the name of such API is entered; I have just tried writing this program so I can load the "Sensors" API for OpenCC Sensors, and possibly other APIs if need be so I can load each API quickly without making an individual program to load each API, therefore cutting out massive amounts of code. I wanted an interface that read: "Please enter the name of the API you wish to add." (I know how to use print("text string" already.) and then the console read the text and insert it into the next piece of code:"os.loadAPI("ocs/apis/<API>")" where <API> was the name of the API I wished to load,API.i.e. the sensor API.
I've looked through countless wiki pages but still have no idea; any suggestions would be welcome. Thank you for your time.