How to set the scale of text on a monitor
#1
Posted 28 September 2012 - 07:20 PM
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!
#2
Posted 28 September 2012 - 07:31 PM
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
#3
Posted 28 September 2012 - 07:34 PM
p.write("Text on the monitor!")
#4
Posted 07 October 2012 - 02:43 PM
MysticT, on 28 September 2012 - 07:31 PM, said:
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
#5
Posted 07 October 2012 - 03:28 PM
ElectricOverride, on 07 October 2012 - 02:43 PM, said:
MysticT, on 28 September 2012 - 07:31 PM, said:
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
#6
Posted 06 November 2012 - 08:49 AM
MysticT, on 07 October 2012 - 03:28 PM, said:
ElectricOverride, on 07 October 2012 - 02:43 PM, said:
MysticT, on 28 September 2012 - 07:31 PM, said:
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
#7
Posted 16 February 2013 - 07:28 AM
#8
Posted 16 February 2013 - 07:38 AM
#9
Posted 16 February 2013 - 07:49 AM
#10
Posted 17 February 2013 - 08:39 AM
#13
Posted 07 March 2013 - 05:28 AM
janmo96, on 16 February 2013 - 07:49 AM, said:
#14
Posted 13 March 2013 - 07:36 AM
Now I know what I did wrong.
#16
Posted 21 March 2013 - 06:51 AM
ElectroSystems™CEO/Elec, on 07 March 2013 - 05:28 AM, said:
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")
#17
Posted 13 July 2013 - 09:50 AM
PlowmanPlow, on 21 March 2013 - 06:51 AM, said:
ElectroSystems™CEO/Elec, on 07 March 2013 - 05:28 AM, said:
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")
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











