Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- monitor = peripheral.find("monitor")
- if monitor then
- local scale, w, h, left, top
- for scale = 2, 0.5, -0.5 do
- monitor.setTextScale(scale)
- w, h = monitor.getSize()
- if w >= 51 and h >= 19 then break end
- end
- left = math.floor((w-51)/2)+1
- top = math.floor((h-19)/2)+1
- screen = window.create(monitor, left, top, 51, 19)
- end
- while true do
- local sExample = http.get("http://benandhayley.com/trainat.php") --Get contents of page
- monitor.setCursorPos(16,3) monitor.write("Train Station")
- monitor.setCursorPos(16,7)
- local sFinalRead = sExample.readAll()
- local sFinalRead2 = sFinalRead :gsub("%^a", "\n")
- monitor.write(sFinalRead2)
- sExample.close()
- sleep(4)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement