Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dSide = "bottom"
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement