22 posts
Posted 06 May 2014 - 10:48 PM
At this very moment, I have Minecraft open and I am attempting to create an E-Mail program called EnderMail. I want it to be compatible with the JupiterOS as well as other operating systems. The one thing I am not sure how to do is wrapping the wireless modem on the computer to a variable called "modem" (also trying to let you choose where your modem is each time you boot the program (in case your modem is on a different side than the top)), as well as variables for usernames, passwords, and a lot of functions for the actions of refreshing your inbox, sending emails, reading emails, and a server program for hosting all the emails, accounts, etc. How do you think I can possibly make this program work?
Thank you,
-Snapp
1281 posts
Posted 06 May 2014 - 11:02 PM
It's pretty straight forward, and if you can't figure it out i'd really suggest you start with something simpler than an email software.
local modem = peripheral.wrap"side"
There is also no need for the user to select the side of the modem, this can be done automatically
local modem
for k,v in pairs(peripheral.getNames()) do
if type(v) == "modem" and peripheral.call(v,"isWireless") then
modem = peripheral.wrap(v)
break
end
end
if not modem then
error("No modem connected!",0)
end
As for an actual email program, you'd use http. Using a cc computer as an email server is just useless. The range is far too limited to be of any use.
22 posts
Posted 06 May 2014 - 11:48 PM
Okay, good to know.
I'm not that acquainted with Lua, i'm currently learning Python though.
Really, I never actually thought about local. Also, the e-mail program isn't really intended to check your G-Mail account. :|
7083 posts
Location
Tasmania (AU)
Posted 06 May 2014 - 11:51 PM
Maybe have a read of
this, too.
1281 posts
Posted 06 May 2014 - 11:56 PM
Really, I never actually thought about local. Also, the e-mail program isn't really intended to check your G-Mail account. :|
I wasn't saying you hsould make it check actual email servers, but rather setup your own for cc emails. Otherwise they'll be limited by the world the computer is in, and whatever range the compuer currently has. Which might not be a lot, depending on what height it's located at. Although you could setup repeaters to a central server, but again just using http would be a lot simpler.