I made a program for my faction/friends on this Tekkit server that I play on, and often we mostly get on at different times, so I made a program called "writeanote". It asks you "To" (who to leave it for) "Msg" (What the message you want to leave is) and "From" (Obviously, who ever you are) Then after I type it, I was hoping somehow I could type the message on the computer, then Display the message on the Monitor. What I've tried to do is do "monitor top disk/writeanote" and It RUNS writeanote on the monitor, so I have to type in the computer, exit it, look at the monitor, type in the computer, exit it, look at the monitor, and keep doing that until I type the whole thing. How would I type the message into the comptuer, then when I'm done with it, display it on the top monitor.
Program : http://pastebin.com/CubDh6iH
Also, please add tweaks and such to it. I'm still learning, so your feedback + tweaks would really help!
0
How to run a program on Computer + Monitor
Started by n1ghtk1n9, Aug 10 2012 07:06 PM
4 replies to this topic
#1
Posted 10 August 2012 - 07:06 PM
#2
Posted 10 August 2012 - 07:17 PM
somebody did an api for that lemme look for it ...
#3
Posted 10 August 2012 - 10:24 PM
term.redirect(peripheral.wrap(side))
print(to)
print(msg)
print(from)
term.restore()
I think this is how you would do it...just put it at the end of your code
print(to)
print(msg)
print(from)
term.restore()
I think this is how you would do it...just put it at the end of your code
#4
Posted 11 August 2012 - 01:06 AM
here is the code i use: just put this in a program and run the program you want displayed
local nativeTerm = term.native or term
local function invoke(sMethod, ...)
nativeTerm[sMethod](...)
for k,sSide in pairs(redstone.getSides()) do
if peripheral.isPresent(sSide) and peripheral.getType(sSide) == "monitor" then
peripheral.call(sSide, sMethod, ...)
end
end
end
term.write = function(text) invoke("write", text) end
term.scroll = function(n) invoke("scroll", n) end
term.setCursorPos = function(x, y) invoke("setCursorPos", x, y) end
term.setCursorBlink = function( /> invoke("setCursorBlink", /> end
term.clear = function() invoke("clear") end
term.clearLine = function() invoke("clearLine") end
nativeTerm.clear()
shell.run("startup") --or whatever your program is named
no idea how to remove the smileys so here is the pastebin: http://pastebin.com/hBXbrfTP
local nativeTerm = term.native or term
local function invoke(sMethod, ...)
nativeTerm[sMethod](...)
for k,sSide in pairs(redstone.getSides()) do
if peripheral.isPresent(sSide) and peripheral.getType(sSide) == "monitor" then
peripheral.call(sSide, sMethod, ...)
end
end
end
term.write = function(text) invoke("write", text) end
term.scroll = function(n) invoke("scroll", n) end
term.setCursorPos = function(x, y) invoke("setCursorPos", x, y) end
term.setCursorBlink = function( /> invoke("setCursorBlink", /> end
term.clear = function() invoke("clear") end
term.clearLine = function() invoke("clearLine") end
nativeTerm.clear()
shell.run("startup") --or whatever your program is named
no idea how to remove the smileys so here is the pastebin: http://pastebin.com/hBXbrfTP
#5
Posted 11 August 2012 - 01:30 PM
wonderdude, on 11 August 2012 - 01:06 AM, said:
here is the code i use: just put this in a program and run the program you want displayed
local nativeTerm = term.native or term
local function invoke(sMethod, ...)
nativeTerm[sMethod](...)
for k,sSide in pairs(redstone.getSides()) do
if peripheral.isPresent(sSide) and peripheral.getType(sSide) == "monitor" then
peripheral.call(sSide, sMethod, ...)
end
end
end
term.write = function(text) invoke("write", text) end
term.scroll = function(n) invoke("scroll", n) end
term.setCursorPos = function(x, y) invoke("setCursorPos", x, y) end
term.setCursorBlink = function( /> invoke("setCursorBlink", /> end
term.clear = function() invoke("clear") end
term.clearLine = function() invoke("clearLine") end
nativeTerm.clear()
shell.run("startup") --or whatever your program is named
no idea how to remove the smileys so here is the pastebin: http://pastebin.com/hBXbrfTP
local nativeTerm = term.native or term
local function invoke(sMethod, ...)
nativeTerm[sMethod](...)
for k,sSide in pairs(redstone.getSides()) do
if peripheral.isPresent(sSide) and peripheral.getType(sSide) == "monitor" then
peripheral.call(sSide, sMethod, ...)
end
end
end
term.write = function(text) invoke("write", text) end
term.scroll = function(n) invoke("scroll", n) end
term.setCursorPos = function(x, y) invoke("setCursorPos", x, y) end
term.setCursorBlink = function( /> invoke("setCursorBlink", /> end
term.clear = function() invoke("clear") end
term.clearLine = function() invoke("clearLine") end
nativeTerm.clear()
shell.run("startup") --or whatever your program is named
no idea how to remove the smileys so here is the pastebin: http://pastebin.com/hBXbrfTP
local nativeTerm = term.native or term local function invoke(sMethod, ...) nativeTerm[sMethod](...) for k,sSide in pairs(redstone.getSides()) do if peripheral.isPresent(sSide) and peripheral.getType(sSide) == "monitor" then peripheral.call(sSide, sMethod, ...) end end end term.write = function(text) invoke("write", text) end term.scroll = function(n) invoke("scroll", n) end term.setCursorPos = function(x, y) invoke("setCursorPos", x, y) end term.setCursorBlink = function( invoke("setCursorBlink", end term.clear = function() invoke("clear") end term.clearLine = function() invoke("clearLine") end nativeTerm.clear() shell.run("startup") --or whatever your program is named
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users