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

Help with using functions in a peripheral

Started by TheArchitect, 09 January 2013 - 10:43 AM
TheArchitect #1
Posted 09 January 2013 - 11:43 AM
Sorry if this is well known or something, I've been searching the forums and I haven't found a question like this and it's not very clear in the wiki.

I have an advanced monitor as a peripheral wrap, and I'd like to use the paintutils API on it, but if I do this:


screen = peripheral.wrap("back")
paintutils.drawImage(...)

It draws the image on the computer's console. I tried the following but it doesn't work.


screen.paintutils.drawImage(...)

How should I do this?

Thanks in advance :)/>

[Edit] I wanted to use the computer's console to display secondary messages but I think switching between them using term.redirect(…) and term.restore() is acceptable enough for this purpose. Must test.
</noobquestion>
Orwell #2
Posted 09 January 2013 - 12:18 PM
[Edit] I wanted to use the computer's console to display secondary messages but I think switching between them using term.redirect(…) and term.restore() is acceptable enough for this purpose. Must test.
That will be your only choice if you want to use paintutils without modification. It is really easy to edit paintutils to use a monitor though. You can look in /rom/apis/paintutils .
TheArchitect #3
Posted 09 January 2013 - 12:30 PM
Yes, it's just what I wanted to do. Funny how sometimes you only find out about something after asking about it. I think I can do just fine just by using term.redirect(…)