monitors,modems,menu's AND MORE!!!!!!!!!!!!!!
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
im a noob
Started by spysean1499, 16 March 2013 - 08:32 PMPosted 16 March 2013 - 09:32 PM
im a noob and i neeeeeeeeeeeeeeeeeeeeeeed help with:
monitors,modems,menu's AND MORE!!!!!!!!!!!!!!
monitors,modems,menu's AND MORE!!!!!!!!!!!!!!
Posted 16 March 2013 - 09:33 PM
dose anayone know how to set up a SYMPLEemail program
Posted 16 March 2013 - 09:47 PM
you will need to post a more specific topic with a relevant title before we can assist you. include as many details as you can and we will ask if we need anything more
Posted 16 March 2013 - 10:47 PM
how to i chang the title?
Posted 16 March 2013 - 10:57 PM
Click edit at the bottom right of the top post, click more options and you can change the title there
Posted 17 March 2013 - 04:00 AM
Just look at the wiki. We are not here to describe every little thing about modems, monitors, and such when the wik already does that
Posted 17 March 2013 - 04:59 AM
I have found the wiki to be not very thorough in some instances, and hard to follow. It may be easier for some who have previous coding experience, but I don't use it for most cases. There are alot of really good YouTube videos on ComputerCraft, I suggest you just search what you need help with and watch some of those.
Posted 17 March 2013 - 05:57 AM
im a noob and i neeeeeeeeeeeeeeeeeeeeeeed help with:
monitors,modems,menu's AND MORE!!!!!!!!!!!!!!
What you ask is quite broad, but I'll give it a go.
To begin, monitors and modems are all peripherals(along with printers and disk drives). A peripheral is something you can attach to a computer to allow more functionality to your computers. In the following sections, I'll describe them all and their uses:
How to use a peripheral:
[indent=1]In most instances, in order to use a peripheral you need to wrap it. Wrapping is basically telling your program which sides any peripherals you like to use are on. This can be achieved by using the following command in your script:
p = peripheral.wrap("side that your peripheral is on")
. What we did here was; set the variable for the peripheral "p", then use the peripheral API, "peripheral.wrap("side")". In CC, there are six sides that a peripheral to wrap to, "top", "bottom", "back", "front", "left", "right". Whatever side your peripheral is on, but the corresponding side in the wrap. BTW, an API or Application Programming Interface is another program that can be loaded and used global functions within it. Now some peripherals have methods. Methods are certain functions that an object can hold. (If you want to learn more, Google Methods and Objects). An example of a method is for a modem: "transmit". If you wrap a modem, you can access a few other methods other than sending or opening and closing. This allows more control over the modem. "Transmit" is a method that is for use with channels (a great guide on channels can be found here). That is a method for modems. In the next section I'll cover computer peripheral basics.[/indent]Computers:
[indent=1]Computers are the basic thing in ComputerCraft, these are where everything takes place. There are two types, Advanced and normal. The difference between the two, is that Advanced allows colors and mouse interaction, versus normal that supports only the basics. If you wrap a computer using the earlier line of code, you have access to a few methods. They are, "p.turnOn()", "p.shutdown", "p.reboot()", and "p.getId()". Remember, the "p" can be whatever you like, it's simply a variable. The only one that returns anything, would be "p.getId()", which gives back the id of the attached computer.[/indent]
Monitors:
[indent=1]Similar to computers, there are two types, Advanced and normal. They do the same thing, except they have no GUI (Graphical User Interface), they simply show things only. They can be combined together to make quite a large display (placed side by side). Mainly, they are used to output text or program progress, but advanced programmers can even making buttons using mouse interaction. On a computer, when writing text to a screen, you could use term.write("whatever"). This prints to terminal screen, not monitor. After you have wrapped a monitor, you can use "p.write("whatever")" to print to the monitor instead. You can also use all the term APIs, to a degree. Including changing colors and getting the sizes of the screen. They are fun and a lot can be achieved with them.[/indent]
Printer:
[indent=1]It's exactly that. You can print things right from your program. Wrap it, and use "p.newPage()", then "p.write("whatever")" to print to a page, then "p.endPage()" to finish it. You can also get paper levels and ink levels. Check this out to get all available functions.[/indent]
Disk Drive:
[indent=1]Disk drives allow usage of floppy disks and music disks. They are mainly used in the main shell, not programs, but they can be used there to. Shell, is just the terminal you interact with when you right click a computer. Floppy disks can be labeled or given a name so as not to get confused with others. They are mainly for transporting files from computer to computer, used a lot.[/indent]
Modems:
[indent=1]These are the wireless communication aspects of CC. As mentioned above, you can, wrap it, but not always necessary, only for more advanced networking. In normal usage, they are used for sending and receiving things, in order to activate one, you need to use "rednet.open("side of modem")". Rednet is the wireless in CC. The modem will now turn red, thus it's activated. Basic usage would say that, "rednet.send(id,String message)". This sends a message to the computer with id "id", with the payload or message "String message". In order to get a message, there are two ways, one is "rednet.receive()" or use os.pullEvent("modem_message"). They act the same. Normal usage is:
event, p1,p2,p3 = os.pullEvent("modem_message")
. Os.pullEvent is advanced, don't worry right now. What we got from that is "event" or the name of pulled event, "p1" is the computer that sent the message (different when used with channels), "p2" payload or message, "p3" is the distance from the sender. Rednet.receive() is the same[/indent]Wired Modems:
[indent=1]These are the exact same as wireless modems, but required LAN cable connected to the target in order to be used with then. The advantage of these, is that you can get mush more distance with them, whereas wireless have set ranges. They also allow peripherals to be wrapped from a distance away. This lets you have a monitor or another computer far away and still control it. You still use wrap, but instead of the side, when you right click a wired modem, a name will same "****_connected" or "******_disconnected". Whatever the "*****" says use that in the peripheral.wrap("that name not the side"). Same methods apply.[/indent]
This is all I have now. Any questions just send me a message. Hoped I could help and good luck!
Posted 17 March 2013 - 06:01 AM
The wiki covers everything the last post covered… People should really go there before asking questions. It saves us the trouble of explaining.I have found the wiki to be not very thorough in some instances, and hard to follow. It may be easier for some who have previous coding experience, but I don't use it for most cases. There are alot of really good YouTube videos on ComputerCraft, I suggest you just search what you need help with and watch some of those.