3 posts
Posted 10 February 2015 - 11:07 PM
I am a complete noob to this and i have miraculously managed to string toghether a program, but now i am wondering, is there any way to start a program on a computer from a pocket computer? like i type into the pocket computer "Run program ("base")" and it runs on my computer? if so how? all help is appreciated!
957 posts
Location
Web Development
Posted 11 February 2015 - 01:05 AM
You probably need to use modems for this.
The pocket computer could send a message through the modems, and the other computer would run the program when it got the message.
The receiving computer needs to be running a program that listens for messages.
Here is the Modem API:
http://computercraft.info/wiki/Modem_%28API%29Or the Rednet API:
http://computercraft.info/wiki/Rednet_%28API%29You can use either, but I personally prefer interfacing with modems directly (with the Modem API)
Just ask if you have any questions :)/>
3 posts
Posted 11 February 2015 - 01:41 AM
Thanks a lot, i am now trying to figure out how to use the rednetAPI but whenever i try to use it i get an attempt to call nil. How do i actually use the API's? do i have to get them off pastebin and use the os.loadAPI? if so where can i find the pastebin? (i might be way off on that last part)
1220 posts
Location
Earth orbit
Posted 11 February 2015 - 01:55 AM
Don't forget
read for typing in your commands (in case you weren't already aware)
EDIT: corrected a mistake
Edited on 17 February 2015 - 04:41 AM
3 posts
Posted 11 February 2015 - 01:56 AM
Good job Dog, answered my question before it was approved!
Oh wait no you didnt, still, thanks Dog!
1220 posts
Location
Earth orbit
Posted 11 February 2015 - 02:59 AM
You're welcome :)/>
Please post your code - that'll help us help you a lot easier and faster.
In answer to using the APIs - no, you don't need to download them and use os.loadAPI - they're 'built-in' to CC's Lua
EDIT: Don't forget to use code tags for your code
[.CODE]
code here
[./CODE]
(use the above tags, but without the dots)
Edited on 11 February 2015 - 02:00 AM
957 posts
Location
Web Development
Posted 11 February 2015 - 03:50 AM
Thanks a lot, i am now trying to figure out how to use the rednetAPI but whenever i try to use it i get an attempt to call nil. How do i actually use the API's? do i have to get them off pastebin and use the os.loadAPI? if so where can i find the pastebin? (i might be way off on that last part)
Like Dog said all CC APIs are built in.
For example, with rednet:
rednet.open("right")
would open the modem on the right
You can always type 'help rednet' (replacing rednet with your API or program) in a CC terminal.
That might help give you some info In-game (and lets you know if your spelling is correct)