From c974df9ded30ec342e8e9879a6d723b239da07c1 Mon Sep 17 00:00:00 2001 From: Ale32bit Date: Sat, 31 Oct 2015 17:49:11 +0100 Subject: [PATCH] Update sPhone.lua --- src/sPhone.lua | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/sPhone.lua b/src/sPhone.lua index 6318eca..ff7298f 100644 --- a/src/sPhone.lua +++ b/src/sPhone.lua @@ -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