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

How to set the scale of text on a monitor

Started by ElectricOverride, 28 September 2012 - 06:20 PM
ElectricOverride #1
Posted 28 September 2012 - 08:20 PM
Okay, so lets get started.

first you need to define a peripheral with
p = peripheral.wrap("side")

replace side with whatever side the monitor is on the computer and replace p with whatever you want!

now we shall set the text scale.

p.setTextScale(Text Size)

now replace p with what you replaced p with before and text size, well, you guessed it, how big or small you want to make the text.

Note:The lowest text scale is 1, default and the highest is 5.

Now you can print with print("")

Finally just save, exit and run the program on the monitor,
and if you did this correctly, you should get 0 errors and your text should be the right size.

Happy printing!
MysticT #2
Posted 28 September 2012 - 08:31 PM
I think you missed some steps.

local mon = peripheral.wrap("side") -- get the monitor. side is the side of the monitor
mon.setTextScale(size) -- set the text size. size must be a number between 0.5 and 5 in increments of 0.5
term.redirect(mon) -- redirect output to the monitor
-- now you can print to the monitor
print("Text on the Monitor!")
term.restore() -- restore the output to the console
Cranium #3
Posted 28 September 2012 - 08:34 PM
Or to put it on the monitor without redirecting:

p.write("Text on the monitor!")
ElectricOverride #4
Posted 07 October 2012 - 03:43 PM
I think you missed some steps.

local mon = peripheral.wrap("side") -- get the monitor. side is the side of the monitor
mon.setTextScale(size) -- set the text size. size must be a number between 0.5 and 5 in increments of 0.5
term.redirect(mon) -- redirect output to the monitor
-- now you can print to the monitor
print("Text on the Monitor!")
term.restore() -- restore the output to the console
hmm, my tutorial is on what i do and it works . dunno.
MysticT #5
Posted 07 October 2012 - 04:28 PM
I think you missed some steps.

local mon = peripheral.wrap("side") -- get the monitor. side is the side of the monitor
mon.setTextScale(size) -- set the text size. size must be a number between 0.5 and 5 in increments of 0.5
term.redirect(mon) -- redirect output to the monitor
-- now you can print to the monitor
print("Text on the Monitor!")
term.restore() -- restore the output to the console
hmm, my tutorial is on what i do and it works . dunno.
Yes, but I meant that you can't use print without redirecting, and you didn't say that.
ElectricOverride #6
Posted 06 November 2012 - 08:49 AM
I think you missed some steps.

local mon = peripheral.wrap("side") -- get the monitor. side is the side of the monitor
mon.setTextScale(size) -- set the text size. size must be a number between 0.5 and 5 in increments of 0.5
term.redirect(mon) -- redirect output to the monitor
-- now you can print to the monitor
print("Text on the Monitor!")
term.restore() -- restore the output to the console
hmm, my tutorial is on what i do and it works . dunno.
Yes, but I meant that you can't use print without redirecting, and you didn't say that.
Ah, I see, okay.
janmo96 #7
Posted 16 February 2013 - 07:28 AM
how to set position of the text
Lyqyd #8
Posted 16 February 2013 - 07:38 AM
Try reading the wiki. You use term.setCursorPos (or replace term with a wrapped monitor table).
janmo96 #9
Posted 16 February 2013 - 07:49 AM
how i can do like rules info that will show all to time cause when i disconnect i cant see text what i putted on monitor
MudkipTheEpic #10
Posted 17 February 2013 - 08:39 AM
Smallest font is 0.5 not 1… I think
Dlcruz129 #11
Posted 17 February 2013 - 08:47 AM
Smallest font is 0.5 not 1… I think

And you are correct.
ElectricOverride #12
Posted 07 March 2013 - 05:27 AM
Smallest font is 0.5 not 1… I think

And you are correct.
This was before the smallest font was 0.5
ElectricOverride #13
Posted 07 March 2013 - 05:28 AM
how i can do like rules info that will show all to time cause when i disconnect i cant see text what i putted on monitor
You need to restart the computer, as all computers/turtles shutdown once a server or singleplayer client is stopped.
no9name909 #14
Posted 13 March 2013 - 07:36 AM
Thanks for the tutorial!
Now I know what I did wrong.
ElectricOverride #15
Posted 18 March 2013 - 07:05 AM
Thanks for the tutorial!
Now I know what I did wrong.
No problem.
PlowmanPlow #16
Posted 21 March 2013 - 06:51 AM
You need to restart the computer, as all computers/turtles shutdown once a server or singleplayer client is stopped.

Remember that you can put a "startup" program on the computer which calls your program when the computer starts (i.e. when the server/SSP starts)

shell.run("myprogram")
ElectricOverride #17
Posted 13 July 2013 - 10:50 AM
You need to restart the computer, as all computers/turtles shutdown once a server or singleplayer client is stopped.

Remember that you can put a "startup" program on the computer which calls your program when the computer starts (i.e. when the server/SSP starts)

shell.run("myprogram")
I now know that using shell.run works, I used to allways think you needed to manually start a pc or nothing would happen, thanks!