Print screen
#1
Posted 21 January 2013 - 06:20 PM
like this but color and on a screen
print( [[To-Do List
1.Get boxite
2.Finish strip mine
3.Get redstone]] )
barkround white
#2
Posted 21 January 2013 - 06:24 PM
term.setTextColour(colours.black) -- to set the colour of the text term.setBackgroundColour(colours.white) -- to set the colour of the background term.clear() -- to clear the screen so the screen will become whit term.setCursorPos(1, 1) -- reset the cursor print([[ 1. Get boxite 2. Finish strip mine 3. Get redstone]])
#3
Posted 21 January 2013 - 06:26 PM
and how do i get it to print on my monitor?
#4
Posted 21 January 2013 - 06:42 PM
so something like this
mon = peripheral.wrap("<side of monitor>")
mon.setTextColour(colours.black) -- to set the colour of the text
mon.setBackgroundColour(colours.white) -- to set the colour of the background
mon.clear() -- to clear the screen so the screen will become white
mon.setCursorPos(1, 1) -- reset the cursor
print([[
1. Get boxite
2. Finish strip mine
3. Get redstone]])
and the other part of your question...I assume you mean Color vs. Colour? Either way works.
#5
Posted 21 January 2013 - 07:01 PM
thx if you can respond
#6
Posted 21 January 2013 - 07:09 PM
Monitor = peripheral.wrap("right") -- where the monitor is on the right of the computer.
Now you can use the monitor as if it was term.function. Instead of usimg term, you use monitor.
-- so like this in the above code
Monitor.setBackgroundColour(colours.white)
Monitor.setTextColour(coliurs.black)
Monitor.clear()
-- monitors only have a write function so printing is not allowed so eaxh new line you will need to reset cursor pos. Or try this
Monitor.write([[
Txt
Text
Text]])
Typed this on my phone... Was quite difficult
#7
Posted 21 January 2013 - 07:11 PM
Willibilly19, on 21 January 2013 - 06:42 PM, said:
local mon = peripheral.wrap("left")
term.redirect(mon)
-- anything with term API or print and write will now go to the monitor
term.restore()
-- now everything is back on the computer
Using this method you can use print... #8
Posted 21 January 2013 - 07:11 PM
mon = peripheral.wrap("<side of monitor>")
just replace the <side of monitor> with back. That will tell the computer the monitor is on the back.
I missed the bottom of the code, but you could just edit to write instead of print.
You can use any of these http://computercraft.../wiki/Term_(API) just replace the "term" with "mon".
There is probably a more efficient way that editing each line to "mon.write()" but that's how I know how to do it.
mon = peripheral.wrap("back")
mon.setTextColour(colours.black) -- to set the colour of the text
mon.setBackgroundColour(colours.white) -- to set the colour of the background
mon.clear() -- to clear the screen so the screen will become white
mon.setCursorPos(1, 1) -- line 1
mon.write("1. Get boxite")
mon.setCursorPos(1,2) --line 2 (might have the 1&2 backwards:P)
mon.write("2. Finish strip mine")
mon.setCursorPos(1,3) --line 3
mon.write("3. Get redstone")
Ninja'd with 2 great suggestions. I'd listen to them:)
#9
Posted 21 January 2013 - 07:12 PM
#10
Posted 21 January 2013 - 07:15 PM
Just start at "Monitor"
Also, ignore the [/code] at the bottom
#11
Posted 21 January 2013 - 07:15 PM
#12
Posted 21 January 2013 - 07:18 PM
#14
Posted 21 January 2013 - 07:20 PM
candycool1234, on 21 January 2013 - 07:18 PM, said:
Yea, do peripheral.wrap("back").
Don't think there is a way to shorten it.
#16
Posted 21 January 2013 - 08:21 PM
#17
Posted 21 January 2013 - 08:29 PM
mon = peripheral.wrap("back")
mon.setTextColor(colors.blue)
mon.setBackgroundColor(colous.white)
mon.setTextScale(2) --can be 1-5
mon.clear()
mon.setCursorPos(5,1)
mon.write("FuzzyCorp todo list")
mon.setCursorPos(1,2)
mon.write("1.----- 2.----- 3. -----")
mon.setCursorPos(1,3)
mon.write("4. ----- 5. ----- 6. -----")
From there, you'd have to set your cursor position and write each line individually, but it should work.
You'll probably have to adjust the cursor positions here, I just guessed lol
EDIT* Realized I had quotes around the text scale 2, if you've copied already, get rid of those. it's fixed now though.
#18
Posted 21 January 2013 - 08:43 PM
#19
Posted 21 January 2013 - 08:47 PM
#20
Posted 21 January 2013 - 08:52 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











