This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Parabolah's profile picture

Need someone to make email program

Started by Parabolah, 05 April 2013 - 01:11 PM
Parabolah #1
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
Parabolah #2
Posted 05 April 2013 - 03:13 PM
all lines should be as far out as the second to last print
print([[________________________________________________ ]])
lieudusty #3
Posted 05 April 2013 - 03:21 PM
Very inefficient way of printing menus
Dlcruz129 #4
Posted 05 April 2013 - 03:44 PM
I'm assuming you're using tekkit by the lack of color functions? You'll be lucky if you find someone to write a program for you. Go to http://www.computercraft.info/wiki/ and learn about key events and os.pullEvent()
SuicidalSTDz #5
Posted 05 April 2013 - 04:02 PM
Most members here will say, "Do it yourself! We aren't your code slaves!" or something of the variety. Also, like Dlcruz/The Necromancer said, have fun finding someone to code this for you on Tekkit. My honset suggestion, try doing it yourself. Learn about the use of tables and events of the sorts.

EDIT: Why are you using multi-line prints when you aren't printing multiple lines. I'm just trying to say, you aren't exactly using the function correctly..
Dlcruz129 #6
Posted 05 April 2013 - 04:33 PM
Most members here will say, "Do it yourself! We aren't your code slaves!" or something of the variety. Also, like Dlcruz/The Necromancer said, have fun finding someone to code this for you on Tekkit. My honset suggestion, try doing it yourself. Learn about the use of tables and events of the sorts.

EDIT: Why are you using multi-line prints when you aren't printing multiple lines. I'm just trying to say, you aren't exactly using the function correctly..

Just when I think that necromancy thing is over, Mr. Double Poster here has to remind me of it. :P/>
SuicidalSTDz #7
Posted 05 April 2013 - 04:57 PM
Most members here will say, "Do it yourself! We aren't your code slaves!" or something of the variety. Also, like Dlcruz/The Necromancer said, have fun finding someone to code this for you on Tekkit. My honset suggestion, try doing it yourself. Learn about the use of tables and events of the sorts.

EDIT: Why are you using multi-line prints when you aren't printing multiple lines. I'm just trying to say, you aren't exactly using the function correctly..

Just when I think that necromancy thing is over, Mr. Double Poster here has to remind me of it. :P/>
Ah! You learned my deepest, darkest, most mind challenging secret.. I think your title should be more along the lines of, oh I don't know, 'A Necromancer'? :D/>

Since this post I made would be deleted for irrelevancy, I counteract it with this:

Main Post: Look at some other email programs to get some ideas on how to do it.