Okay, so lets say I have a computer that has a while loop that asks for a password. So I don't want to destroy that computer, but I want to run code from a disk while the other program is up, without having to reboot the computer. Is this possible? Some kind of virus?
Run a floppy disk during a while loop?
Started by oyasunadev, Nov 05 2012 12:48 PM
4 replies to this topic
#1
Posted 05 November 2012 - 12:48 PM
#2
Posted 25 November 2012 - 09:23 PM
I think you would need to look into the parallel API; I don't know much about the parallel API though.
#3
Posted 25 November 2012 - 09:33 PM
You might want to look into the disk API.
Something like this.
Something like this.
driveSide = "left"
while true do
if disk.isPresent(driveSide) and disk.hasData(driveSide) then
os.run({}, "program on disk")
sleep(1)
disk.eject(driveSide)
end
sleep(2)
end
#4
Posted 26 November 2012 - 05:31 AM
Use the parallel API.http://computercraft...?title=Parallel
function disk() -- do the disk running stuff here end function pass() -- do the pass stuff here end while true do parallel.waitForAny(disk, pass) end
#5
Posted 26 November 2012 - 07:05 AM
Isn't the whole point of having a password loop to prevent the computer from doing anything until the password is entered?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











