Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this script displays possible online programs that the client can start.
- version = "1.0.0"
- settings.load(".settings")
- local Sites_Display = {"Federal Government Website","Laws","WebEngine","exit"}
- local Sites_Type = {"Paste","Paste","App","App"}
- local Sites_Link = {"LXFqgEQt","TLdkuycX","os/os_Programs/os_SearchEngine/Base",settings.get("os_DesktopLoc")}
- local function Clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function CUI(m) --declare function
- n=1
- local l = #m
- while true do
- term.setCursorPos(1,2)
- for i=1, #m, 1 do --traverse the table of options
- if i==n then term.clearLine() print(i, " ["..m[i].."]") else term.clearLine() print(i, " ", m[i]) end --print them
- end
- a, b= os.pullEvent("key") --wait for keypress
- if b==keys.w and n>1 then n=n-1 end
- if b==keys.s and n<l then n=n+1 end
- if b==keys.enter then break end
- end
- return n --return the value
- end
- --os/os_Programs/os_SearchEngine/Base
- local function OptionsMenu()
- Clear()
- print("options")
- local n = CUI(Sites_Display)
- if Sites_Type[n] == "Paste" then
- shell.run("pastebin","run",Sites_Link[n])
- elseif Sites_Type[n] == "App" then
- shell.run(Sites_Link[n])
- end
- end
- OptionsMenu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement