Posted 05 April 2013 - 03:11 PM
I need someone with good experience to code an email program for me to put in my Operating System I treid but failed would like print's to stay the same maybe add menu [Inbox] and [Send] possible [Archive] and include your name in the script as I will keep it there thanks code auto indented copy paste current code: – Mail
–
– Made By [Your IGN]
– keep print sizes lined up!
term.clear()
term.setCursorPos( 1, 1 )
– | Center
print([[ MAIL By:Your IGN |(x)]])
print([[————————————————-]])
print([[ Welcome! ]])
print([[ Just wait a second while we contact ]])
print([[ our server for any incoming mail… ]])
print([[ ]])
print([[ Contacting server… ]])
print([[ ]])
print([[ ]]) – Middle row
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ CTRL + R ]])
print([[ This screen seems to freeze, we'll have a look. ]])
print([[________________________________________________ ]])
print([[(Start)| MAIL | ]])
rednet.open("top")
while true do
id, message = rednet.recieve()
if fs.exists(id .. message)then
mail = fs.open(id .. message, "r")
term.clear()
term.setCursorPos( 1, 1 )
– | Center
print([[ MAIL |(x)]])
print([[————————————————-]])
print([[ ]])
print([[ To: You ]])
print([[ From: Computer #]]..id..[[ ]])
print([[ Message: ]])
print([[ ]]..Message..[[ ]])
print([[ ]])
print([[ ]]) – Middle row
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[________________________________________________ ]])
print([[(Start)| MAIL | ]])
readmail = mail.readAll()
rednet.broadcast(readmail)
mail.close()
fs.delete(id)
else if message == "sendmail" then
id1, to = rednet.recieve()
a = 1
while fs.exists(to .. a)
a = a + 1
end
mail = fs.open(to .. a, "w")
mail.writeLine("To: " .. to)
id2, tm = rednet.recieve()
mail.write™
mail.close
term.clear()
term.setCursorPos( 1, 1 )
– | Center
print([[ MAIL |(x)]])
print([[————————————————-]])
print([[ You: ]] .. id .. [[ ]])
print([[ Sent to: ]] .. to .. [[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]]) – Middle row
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[________________________________________________ ]])
print([[(Start)| MAIL | ]])
end
end
–
– Made By [Your IGN]
– keep print sizes lined up!
term.clear()
term.setCursorPos( 1, 1 )
– | Center
print([[ MAIL By:Your IGN |(x)]])
print([[————————————————-]])
print([[ Welcome! ]])
print([[ Just wait a second while we contact ]])
print([[ our server for any incoming mail… ]])
print([[ ]])
print([[ Contacting server… ]])
print([[ ]])
print([[ ]]) – Middle row
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ CTRL + R ]])
print([[ This screen seems to freeze, we'll have a look. ]])
print([[________________________________________________ ]])
print([[(Start)| MAIL | ]])
rednet.open("top")
while true do
id, message = rednet.recieve()
if fs.exists(id .. message)then
mail = fs.open(id .. message, "r")
term.clear()
term.setCursorPos( 1, 1 )
– | Center
print([[ MAIL |(x)]])
print([[————————————————-]])
print([[ ]])
print([[ To: You ]])
print([[ From: Computer #]]..id..[[ ]])
print([[ Message: ]])
print([[ ]]..Message..[[ ]])
print([[ ]])
print([[ ]]) – Middle row
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[________________________________________________ ]])
print([[(Start)| MAIL | ]])
readmail = mail.readAll()
rednet.broadcast(readmail)
mail.close()
fs.delete(id)
else if message == "sendmail" then
id1, to = rednet.recieve()
a = 1
while fs.exists(to .. a)
a = a + 1
end
mail = fs.open(to .. a, "w")
mail.writeLine("To: " .. to)
id2, tm = rednet.recieve()
mail.write™
mail.close
term.clear()
term.setCursorPos( 1, 1 )
– | Center
print([[ MAIL |(x)]])
print([[————————————————-]])
print([[ You: ]] .. id .. [[ ]])
print([[ Sent to: ]] .. to .. [[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]]) – Middle row
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[________________________________________________ ]])
print([[(Start)| MAIL | ]])
end
end