23 posts
Location
(Insert egocentric quote here)
Posted 09 October 2013 - 04:32 PM
I would like to be able to use the paintutils API on an advanced monitor adjacent to my computer. I have no idea how. I tried something like
monitor.paintutils.drawLine(x, y, x, y, color)
and
local function line = paintutils.drawLine(x, y, x, y, color) end
monitor.line()
I don't want to use a separate program
shell.run("monitor", "right", "program")
any ideas?
1522 posts
Location
The Netherlands
Posted 09 October 2013 - 05:23 PM
You should redirect to your monitor using:
term.redirect( monObject )
-- Regular paintutil calls get onto the monitor
term.restore()
Here is an awesome tutorial about redirecting,
written by LBPHacker
23 posts
Location
(Insert egocentric quote here)
Posted 10 October 2013 - 06:14 AM
You should redirect to your monitor using:
term.redirect( monObject )
-- Regular paintutil calls get onto the monitor
term.restore()
Here is an awesome tutorial about redirecting,
written by LBPHacker
Thanks,just what I needed! Great job following the
Ask A Pro Renewal Project
33 posts
Location
Australia
Posted 19 April 2015 - 09:25 AM
i don't really understand what your saying
2679 posts
Location
You will never find me, muhahahahahaha
Posted 19 April 2015 - 10:31 AM
well, it works like this:
term is an output object. You can redirect the flow of the output to a monitor by doing this:
m = peripheral.wrap(sideofmon)
term.redirect(m)
Now everything that is to be printed on the term, will be printed on the monitor.
Just try it out ;)/>
1080 posts
Location
In the Matrix
Posted 19 April 2015 - 06:34 PM
You should redirect to your monitor using:
term.redirect( monObject )
-- Regular paintutil calls get onto the monitor
term.restore()
term.restore was removed at CC 1.6. Now term.redirect returns a value of where it just redirected FROM so you need to grab that, and then redirect back to it when you're done.
local oldTerm = term.redirect(monitor)
--#Do stuff with monitor
term.redirect(oldTerm)