This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
tehryan's profile picture

Weird behavior with os.pullEvent("disk") and monitor.

Started by tehryan, 16 January 2013 - 04:54 AM
tehryan #1
Posted 16 January 2013 - 05:54 AM
os.pullEvent("disk") should only fire when a disk is inserted, and this is usually true except in the following case.

if you connect a monitor, and then use the monitor program in the following way:

> monitor top programname

os.pullEvent("disk") now fires when a disk is ejected as well.
Cranium #2
Posted 16 January 2013 - 06:33 AM
As far as I know, it should throw the event on both anyway….

Edit: Strike that, it should do "disk_remove" for taking out. So it should be a different event.
Edited on 16 January 2013 - 05:39 AM