Difference between revisions of "Disk (event)"
From ComputerCraft Wiki
(Added example.) |
(Made an event specific code snippet.) |
||
| Line 11: | Line 11: | ||
while true do | while true do | ||
event, side = os.pullEvent("disk") | event, side = os.pullEvent("disk") | ||
| − | if disk | + | if event == "disk" then |
| − | + | print("Disk has been inserted") | |
| − | print(" | + | |
end | end | ||
end | end | ||
|output=The title of any music disk put into a connected disk drive. | |output=The title of any music disk put into a connected disk drive. | ||
}} | }} | ||
Revision as of 10:33, 23 April 2013
| This page needs some serious TLC, stat! Please help us by cleaning it, fixing it up, or sparing it some love.
(Reason: A demonstration on the use and handling of this event would be beneficial. AfterLifeLochie 16:13, 30 November 2012 (MSK)) |
| Fired when a disk is inserted into any connected (directly adjacent to) disk drive. | |
| Returned Object 1 | The String value of the side of the disk drive. |