Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local arg = {...}
- local w =7
- local h = 5
- local function Draw(Monitor)
- local X = 1
- local Y = 1
- local file = fs.open(arg[1],"r")
- local STRING = file.readAll()
- file.close()
- for i = 1, string.len(STRING) do
- Monitor.setCursorPos(X,Y)
- Monitor.blit("X",string.sub(STRING,i,i), string.sub(STRING,i,i))
- if X < w then X = X + 1 else Y = Y + 1 X = 1 end
- end
- end
- local function GetTargets()
- local Targets = {peripheral.find("monitors",function(name,monitor) W,H= monitor.getSize() return( if W == 7) end)}
- for i = 1, #Targets do
- Draw(Targets[i])
- end
- end
- GetTargets()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement