This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
polraudio's profile picture

Text on monitor?

Started by polraudio, 17 March 2012 - 12:53 AM
polraudio #1
Posted 17 March 2012 - 01:53 AM
this may sound like a stupid question.

How do i make text show up on a monitor?

My setup is
O = monitor
A = air
C = computer
D = disk drive

AAOOOO
AAOOOO
DCOOOO
Casper7526 #2
Posted 17 March 2012 - 02:08 AM
mon = peripheral.wrap("right")
mon.write("Hello World")


OR

mon = peripheral.wrap("right")
term.redirect(mon)
print "Hello World"
polraudio #3
Posted 17 March 2012 - 02:32 AM
Ok i see how this works now. Thanks :D/>/>
TheOnlyAnti #4
Posted 17 March 2012 - 03:55 AM
or you can simply run a program with

monitor "side" "program name"
wasatchwizard #5
Posted 17 March 2012 - 06:57 PM
I can see my prompt on my external (big) monitor now. that is cool! But, can I also edit my programs and interact with that external monitor?
Liraal #6
Posted 17 March 2012 - 06:59 PM
a slight edit of casper's code

function printM(text)
mon = peripheral.wrap("right")
term.redirect(mon)
print(text)
return true
end
BlueMond #7
Posted 17 March 2012 - 08:26 PM
@ wasatchwizard No you can't interact with the external monitor directly. Only through other computers and turtles.
wasatchwizard #8
Posted 17 March 2012 - 09:09 PM
@
Clueless
Thanks for the response!
Casper7526 #9
Posted 17 March 2012 - 10:05 PM
a slight edit of casper's code

function printM(text)
mon = peripheral.wrap("right")
term.redirect(mon)
print(text)
return true
end

Once it's redirected you dont have to do any of that anymore, you can just code normally.
Liraal #10
Posted 17 March 2012 - 10:06 PM
yeah, but if you have multiple monitors? :D/>/>
Casper7526 #11
Posted 17 March 2012 - 10:57 PM
Then your function wouldn't work anyway as you would have to supply the side as well as text everytime :D/>/>