Posted 20 February 2015 - 07:27 PM
Hi people. I've made a Jukebox Program. Here are the programs:
startup:
startup1:
First it worked very well, but later I got this:
Here are some pictures of it:
In my Disk Drive is nothing else than a Music Disk.
I've tested it on other (new) computers, but no result…
Can anyone help me?
P.S. Sorry for my bad language. I'm not grown up with this language
startup:
shell.run("bg startup1")
startup1:
title = disk.getAudioTitle(dSide)
m = peripheral.wrap("left")
m.setTextScale(0.5)
dSide = "drive_1"
m.setBackgroundColor(colors.black)
m.setTextColor(colors.white)
m.clear()
m.setCursorPos(1,1)
m.write("X Play")
m.setCursorPos(1,2)
m.write("X Stop")
m.setCursorPos(1,3)
m.write("X Edit")
m.setCursorPos(1,4)
m.write("X Exit")
while true do
event, side, x, y = os.pullEvent("monitor_touch")
m.setCursorPos(1,6)
m.clearLine()
if x == 1 and y == 1 then
m.setCursorPos(1,5)
m.clearLine()
if disk.hasAudio(dSide) then
disk.playAudio(dSide)
m.setCursorPos(1,6)
m.write("Playing "..title)
else
m.setCursorPos(1,6)
m.write("No Audio")
end
elseif x == 1 and y == 2 then
shell.run("dj stop")
elseif x == 1 and y == 3 then
m.setCursorPos(1,3)
m.write("X Edit - Editing...")
shell.run("edit startup1")
shell.run("startup")
elseif x == 1 and y == 4 then
shell.run("clear")
disk.stopAudio("drive_0")
m.setCursorPos(1,6)
m.clearLine()
m.write("Not Running...")
shell.run("shell")
end
end
First it worked very well, but later I got this:
disk:3: Expected string
Here are some pictures of it:
In my Disk Drive is nothing else than a Music Disk.
I've tested it on other (new) computers, but no result…
Can anyone help me?
P.S. Sorry for my bad language. I'm not grown up with this language