@name Robotboy655's Text Program
@inputs ConsoleScreen:wirelink KeyBorard_Memory
@outputs Text:string
@persist

#Made by robotboy655
#JUST A TEMPLATE

if(first())
{
 ConsoleScreen:writeCell(2041,1)

	ConsoleScreen:writeCell(2042,559) #Background color
	ConsoleScreen:writeString("                              ",0,0,9,9) #Program upper bar
	ConsoleScreen:writeString(" ",0,0,999,999) #Program icon
	ConsoleScreen:writeString("Notepad",2,0,999,9) #Program name
	ConsoleScreen:writeString("X",29,0,999,933) #Program close
	ConsoleScreen:writeString("                              ",0,1,0,777) #Program menu bar
	
	
	ConsoleScreen:writeString("                              ",0,16,0,777) #Program menu bar
	ConsoleScreen:writeString("Char:",0,16,100,777)
	ConsoleScreen:writeString("                              ",0,17,666,666)
	ConsoleScreen:writeString("Start",0,17,999,70)
}

if (!clk("update")){

#Writing
if (Text:length() < 400 & KeyBorard_Memory & KeyBorard_Memory != 127 & KeyBorard_Memory != 154) {
    Text += toChar(KeyBorard_Memory)
}
if (KeyBorard_Memory==127) {
    Text = Text:left(Text:length()-1)
}
ConsoleScreen:writeString(Text,0,2,100)
ConsoleScreen:writeString(" ",Text:length(),2,999,0,1)
ConsoleScreen:writeString(" ",Text:length()+1,2,999)
#Writing
}

timer("update",10)
if (clk("update")){
ConsoleScreen:writeString(""+Text:length(),5,16,100,777)
}
