Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Printing Program/API by LDShadowLord
- --Function Descriptions:
- --Prepare: Setup function
- --GetCP : Finds the Cursor Pos
- --Print : Whadda ya think?
- --Extra : nullVoid
- --Setting Variables
- ver = 1.1
- side = "right"
- cons = 1
- kons = 1
- --Local Functions
- local function prepare()
- p = peripheral.wrap(side)
- p.newPage()
- p.setPageTitle(tostring(kons))
- kons = kons + 1
- end
- local function getCP()
- vx, vy = p.getCursorPos()
- end
- local function inc()
- getCP()
- cons = vy + 1
- if cons == 20 then
- p.setCursorPos(1,21)
- p.write(" PRNT API // V1.1")
- p.endPage()
- p.newPage()
- p.setPageTitle(tostring(kons))
- kons = kons + 1
- end
- end
- --[[Temps
- function run()
- prepare()
- vw, vh = p.getPageSize()
- print(vw..":"..vh)
- end
- ]]
- --Global Functions
- function setup()
- prepare()
- getCP()
- end
- function title(name)
- p.setPageTitle(name)
- end
- function pprint(text)
- p.write(text)
- inc()
- p.setCursorPos(1,cons)
- end
- function endmain()
- p.setCursorPos(1,19)
- inc()
- p.endPage()
- end
Advertisement
Add Comment
Please, Sign In to add comment