Update sPhone.lua

This commit is contained in:
Ale32bit 2015-10-31 17:49:11 +01:00
parent de1fa1a20c
commit c974df9ded

View file

@ -479,14 +479,14 @@ end
local f = fs.open(_rApp, "r")
local script = f.readAll()
f.close()
os.pullEvent = os.oldPullEvent
local ok, err = pcall(function() setfenv(loadstring(script),getfenv())() end)
if not ok then
f.open("/crash/".._rApp,"a")
f.write(err.."\n")
f.close()
sPhone.winOk(_rApp.." crashed","Check /crash")
os.pullEvent = os.pullEventRaw
sPhone.winOk("Crash: WIP")
return false
end
os.pullEvent = os.pullEventRaw
end
local function lChat()
@ -597,28 +597,29 @@ end
end
else
if (y > 2 and x > 1) and (y < 6 and x < 9) then
os.pullEvent = os.oldPullEvent
term.setBackgroundColor(colors.black)
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colors.white)
print("Type \"exit\" to close the shell")
shell.run("/rom/programs/shell")
sPhone.run("/rom/programs/shell")
elseif (y > 2 and x > 10) and (y < 7 and x < 16) then
shell.run("/.sPhone/apps/system/sID")
sPhone.run("/.sPhone/apps/system/sID")
elseif (y > 2 and x > 18) and (y < 6 and x < 25) then
login()
elseif (y > 6 and x > 1) and (y < 10 and x < 11) then
shell.run("/.sPhone/apps/buddies")
sPhone.run("/.sPhone/apps/buddies")
elseif (y > 6 and x > 11) and (y < 10 and x < 18) then
lChat()
elseif (y > 6 and x > 18) and (y < 10 and x < 24) then
shell.run("/.sPhone/apps/sms")
sPhone.run("/.sPhone/apps/sms")
elseif (y > 10 and x > 2) and (y < 14 and x < 8) then
shell.run("/.sPhone/apps/cstwallet")
sPhone.run("/.sPhone/apps/cstwallet")
elseif (y > 10 and x > 9) and (y < 14 and x < 15) then
shell.run("/.sPhone/apps/gps")
sPhone.run("/.sPhone/apps/gps")
elseif (y > 10 and x > 17) and (y < 14 and x < 24) then
shell.run("/.sPhone/apps/system/info")
sPhone.run("/.sPhone/apps/system/info")
end
end
elseif e == "timer" and m == autoLockTimer then