Jump to content




SCREAMING MONITOR


  • You cannot reply to this topic
1 reply to this topic

#1 Jan

  • Members
  • 141 posts
  • Locationthe Netherlands

Posted 20 March 2012 - 04:39 PM

A special version of the 'monitor' program. This version will write everything on the monitor IN CAPITAL LETTERS! Works with any program!

Running adventure on the monitor:

Posted Image

You might think: what is the point of this? Well, not very much. It was more to show that it is possible to redirect the terminal to other objects than 'actual' monitors. And maybe send it over redstone in the future!
function printUsage()
print( "Usage: monitor <side> <program> <arguments>" )
return
end
local tArgs = { ... }
if #tArgs < 2 then
printUsage()
return
end
sSide = tArgs[1]
if peripheral.getType( sSide ) ~= "monitor" then
print( "No monitor on "..sSide.." side" )
return
end
local sProgram = tArgs[2]
local sPath = shell.resolveProgram( sProgram )
if sPath == nil then
print( "No such program: "..sProgram )
return
end
print( "SCREAMING "..sProgram.." ON "..sSide.." MONITOR!" )
local monitor = peripheral.wrap( sSide )
monitor.write = function(tekst) peripheral.call(sSide,"write",string.upper(tekst)) end
monitor.clear()
monitor.setCursorPos(1,1)
term.redirect( monitor )
shell.run( sProgram, select( 3, ... ) )
term.restore()


#2 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 20 March 2012 - 05:20 PM

Lol that is kinda cool if I think about it :D/> Good job jan





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users