Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
local p = peripheral.find("printer") if not p then error("Couldnt find the printer!") end print("Ink Level: ",p.getInkLevel()) print("Paper Level: ",p.getPaperLevel()) if p.getPaperLevel() == 0 then error("No paper, refill on paper!") end if p.getInkLevel() == 0 then error("No ink, refill on ink!") end term.clear() term.setCursorPos(1,1) print("--Printer Text Editor, Press ctrl+q to finalize paper--") term.setCursorPos(1,2) while true do local event, key = os.pullEvent("key") if key == keys.q and os.pullEvent("key") == keys.leftCtrl then print("quit triggered") break elseif key == keys.enter then print() elseif key == keys.backspace then local x, y = term.getCursorPos() term.setCursorPos(x-1,y) term.write(" ") else term.write(keys.getName(key)) end end
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)