This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Custom Program
Started by Karinth, 22 July 2012 - 09:12 AMPosted 22 July 2012 - 11:12 AM
I do not know LUA and I do not need something hard ( I hope it is not hard) I just need a program or code that writes something on a monitor in full size no matter the monitor size. AKA 6x4, 2x2, 10x10 and the message is in full screen no matter which one it is on. Thank you so much.
Posted 22 July 2012 - 01:07 PM
You don't go into a Library and ask them to write books :)/>/>
Posted 22 July 2012 - 10:40 PM
1.Wrong section, This should be in Ask a pro.
2.Make a program called whatever you want example : text Type in :
change side to your monitor side.
Text will get printed on your monitor.
PS.Use n to get to the next line.
2.Make a program called whatever you want example : text Type in :
print("Text you wantednNext line")
Then save and type this in to the console: monitor side textchange side to your monitor side.
Text will get printed on your monitor.
PS.Use n to get to the next line.
Posted 24 July 2012 - 10:40 AM
yourmon = peripheral.wrap("youside")
yourmon.setTextScale(5)
term.redirect(yourmon)
print("TEST")
term.restore()
I have this but the downside is I am trying to make a sign 5 x 4 with this "K Corp." in full screen in the center and cannot figure it out.
Posted 24 July 2012 - 12:52 PM
side = "" -- ENTER STRING SIDE HERE
mon = peripheral.wrap(side)
mon.setTextScale(5)
term.redirect(mon)
print("TEST")
term.restore()
That is the code, you are using "youside" for the side? If its a var then it has to be youside - Without quotes.Posted 24 July 2012 - 01:09 PM
That is the code, you are using "youside" for the side? If its a var then it has to be youside - Without quotes.side = "" -- ENTER STRING SIDE HERE mon = peripheral.wrap(side) mon.setTextScale(5) term.redirect(mon) print("TEST") term.restore()
Will this allow it to be centered and in full screen in a 5 x 4 monitor. I got it to display but not large enough.
Posted 25 July 2012 - 06:32 PM
As far as I know, you can only scale the text to a maximum size, and nothing bigger. The monitor is simply not designed for oversized operations. I think you might get away with having a function for each letter of the alphabet, and each character you decide to use, and have it display that character in ASCII format so it can be blown up really big. It would take lots of time to create those functions, but wouldn't require much more coding after that.
If I'm wrong, and you can scale it larger, I would like to know, since I have been thinking of a giant Tetris monitor myself.
If I'm wrong, and you can scale it larger, I would like to know, since I have been thinking of a giant Tetris monitor myself.
Posted 26 July 2012 - 12:09 PM
I have no clue how to do ASCII but I know what it is…. Well I guess unless someone wants to code it for me on a 5 x 4 monitor I will have to try another idea.
Posted 26 July 2012 - 10:45 PM
Doing ASCII would be something like this:I have no clue how to do ASCII but I know what it is…. Well I guess unless someone wants to code it for me on a 5 x 4 monitor I will have to try another idea.
local function printO()
print(" OOOO ")
print("O O")
print("O O")
print(" OOOO ")
end
Will this allow it to be centered and in full screen in a 5 x 4 monitor. I got it to display but not large enough.
You can easily center it using a function like this:
local w,h = term.getSize()
local function writeCenter(y, s)
term.setCursorPos(math.floor(w - string.len(s)) / 2),y)
term.write(s)
end
Posted 27 July 2012 - 01:03 AM
So going based off of my original idea, would it be possible to actually define each letter of the alphabet with a function? or would that just be something that should never be attempted due to the massive amount of tedious coding?Doing ASCII would be something like this:I have no clue how to do ASCII but I know what it is…. Well I guess unless someone wants to code it for me on a 5 x 4 monitor I will have to try another idea.local function printO() print(" OOOO ") print("O O") print("O O") print(" OOOO ") end
Will this allow it to be centered and in full screen in a 5 x 4 monitor. I got it to display but not large enough.
You can easily center it using a function like this:local w,h = term.getSize() local function writeCenter(y, s) term.setCursorPos(math.floor(w - string.len(s)) / 2),y) term.write(s) end
Posted 27 July 2012 - 08:50 PM
It would certainly be possible, however it would also be extremely tedious, and wouldn't display full screen. If you were to make it display in full screen, you'd have to define the ASCII art of each character in each resolution manually. If you really want to do it, go ahead, but I'd advise against it, mostly because you'd probably have to go through extensive therapy afterwards.So going based off of my original idea, would it be possible to actually define each letter of the alphabet with a function? or would that just be something that should never be attempted due to the massive amount of tedious coding?
Posted 28 July 2012 - 12:07 PM
So going based off of my original idea, would it be possible to actually define each letter of the alphabet with a function? or would that just be something that should never be attempted due to the massive amount of tedious coding?Doing ASCII would be something like this:I have no clue how to do ASCII but I know what it is…. Well I guess unless someone wants to code it for me on a 5 x 4 monitor I will have to try another idea.local function printO() print(" OOOO ") print("O O") print("O O") print(" OOOO ") end
You can easily center it using a function like this:Will this allow it to be centered and in full screen in a 5 x 4 monitor. I got it to display but not large enough.local w,h = term.getSize() local function writeCenter(y, s) term.setCursorPos(math.floor(w - string.len(s)) / 2),y) term.write(s) end
thank you for that I will code in and see if it is what I am looking for. Is there a way to make it on 24/7? without turning it on each time I load?
Posted 28 July 2012 - 10:34 PM