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