This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
tom2018's profile picture

another OS (has video!) [CONTAINS INTERWEBS!][has themes][infinite user support][auto updates]

Started by tom2018, 17 November 2012 - 12:08 PM
tom2018 #1
Posted 17 November 2012 - 01:08 PM
basicly as the title says you need http api for it to work it will install a few of my programs.
PROGRAMS INCLUDED
-internet browser (put modem on top)(it caches websites so if you have no connection it will load cache.)
note: to get server (pastebin) (to edit the page server displays type edit data to change url type edit wherever you saved it) (servers work in progress)
-CMD prompt
-Other items i forgot.
HOW TO USE
-first login use
user: admin
pass: admin
edit users and passes in the directory /user
so to make a user named tom do
edit /user/tom
then type
password
then close
you may want to change admin
VIDEO
http://www.youtube.com/watch?v=mgOif3oaXdM
pictures
Spoiler
PASTEBIN
how to edit themes
log in then type
edit /startup(where os is)
then set the theme variable to A B C or D
note(os wont update with this toggled)
todo
make themes user based not system based
dangranos #2
Posted 18 November 2012 - 04:00 PM
What if i have other screen size? I get black borders or cutted text
TheVarmari #3
Posted 20 November 2012 - 06:33 AM
What if i have other screen size? I get black borders or cutted text

Hah, he didn't think of that.
SpoilerLuckily for me, all my programs use an integrated API built by me that always (or 90% of the time) uses string.rep("-",w-2)
But, another OS? Really?
tom2018 #4
Posted 20 November 2012 - 09:32 AM
What if i have other screen size? I get black borders or cutted text

Hah, he didn't think of that.
SpoilerLuckily for me, all my programs use an integrated API built by me that always (or 90% of the time) uses string.rep("-",w-2)
But, another OS? Really?
i just named it that because of my lack of creativity and the endless amounts of OSs
tom2018 #5
Posted 20 November 2012 - 09:34 AM
What if i have other screen size? I get black borders or cutted text
will add in a special screen sized mode
TheVarmari #6
Posted 21 November 2012 - 04:52 AM
I meant, another OS? We've got enough of them.
Also, why not just use term.getSize() and build the enviroment using that?
tom2018 #7
Posted 21 November 2012 - 04:58 AM
I meant, another OS? We've got enough of them.
Also, why not just use term.getSize() and build the environment using that?
i have 3 reasons why
1.I didn't know how at the time.
2.I still don't know how.
3.PlanetSide2 is coming out soon.
oh and i fixed your spelling
tom2018 #8
Posted 21 November 2012 - 06:17 AM
added video
TheVarmari #9
Posted 22 November 2012 - 03:20 AM
I meant, another OS? We've got enough of them.
Also, why not just use term.getSize() and build the environment using that?
i have 3 reasons why
1.I didn't know how at the time.
2.I still don't know how.
3.PlanetSide2 is coming out soon.
oh and i fixed your spelling
1. Well then, that is acceptable
2. … Then go check the wiki
3. And?
4. "Thanks"
ArchAngel075 #10
Posted 22 November 2012 - 03:31 AM
Hey i noticed you are using alot of button commands in your OS, try adding a "if advanced PC then mouse buttons and clicks enabled"
I already have an api helping my program(tho its only advanced pcs)

say i want to choose "help" i can click on the words or a '[0]' (or whatever) but aat the same time also buttons on KB ?

just a suggestion
tom2018 #11
Posted 22 November 2012 - 04:27 AM
Hey i noticed you are using alot of button commands in your OS, try adding a "if advanced PC then mouse buttons and clicks enabled"
I already have an api helping my program(tho its only advanced pcs)

say i want to choose "help" i can click on the words or a '[0]' (or whatever) but aat the same time also buttons on KB ?

just a suggestion
i want to add that but then we cant support users on tekkit because the if advanced pc is only for later versions, BUT i could use a get version and some other fancy coding.
Geforce Fan #12
Posted 22 November 2012 - 04:37 AM
Hey, you're welcome to copy off my iHomeOS code if you can find it.
Btw, looks sorta-nice, but I think you shouldn't make another OS, there's too many. ShadOS will hopefully take over.
ArchAngel075 #13
Posted 22 November 2012 - 05:47 AM
Hey i noticed you are using alot of button commands in your OS, try adding a "if advanced PC then mouse buttons and clicks enabled"
I already have an api helping my program(tho its only advanced pcs)

say i want to choose "help" i can click on the words or a '[0]' (or whatever) but aat the same time also buttons on KB ?

just a suggestion
i want to add that but then we cant support users on tekkit because the if advanced pc is only for later versions, BUT i could use a get version and some other fancy coding.


hmm i think thats easy, perhaps place both the type of loops into a function (each with own function name) and add a startup part so itl be like this :

-- [[ startup : check for advanced! ]] --
if term.isColor() == true then
xifAdvanced()
  else
   xifBasic()
end

-- [[ The magical tours! ]] --

function xifBasic()
 while true do
  os.startTimer(0.1)
  local gnb,keyr = os.pullEvent()
   if gnb == "timer" then
    --THE MAGICAL TOUR GOES HERE!
----
----
----
----
   elseif gnb == "key" and keyr == 28 then
    return false -- cancells the tour!
   end
 end
end

function xifAdvanced()
 while true do
  os.startTimer(0.1)
  local gnb,keyr = os.pullEvent()
   if gnb == "timer" then
    --THE MAGICAL TOUR GOES HERE!
    ----
    ----
    ----
    ----
   elseif gnb == "key" and keyr == 28 then
    return false -- cancells the tour!
   elseif gnb == "mouse_click" then
    return false -- same but uses mouse too!
   end
 end
end
tom2018 #14
Posted 22 November 2012 - 06:57 AM
well see in tekkit if you do isColor() it will error out.
ArchAngel075 #15
Posted 22 November 2012 - 07:15 AM
hmms…. derps
only thing i can think of is either two versions or make a config file:
Spoiler

-- [[ startup : check for advanced! ]] --
if fs.exists("CONFIG") = true then
tempfile = fs.open("CONFIG","r")
  if tempfile.readLine() == "true" then
   tempfile.close()
   xifAdvanced()
  elseif tempfile.readLine() == "false" then
   tempfile.close()
   xifBasic()
  end
else
  while true do
   tempfile = fs.open("CONFIG","w")
	print("Is this an Advanced computer?")
	print("Use 'Y' or 'N' ")
	reads = read()
	 if reads == "Y" then
	tempfile.writeLine("true")
	tempfile.close()
	 xifAdvanced()
	elseif reads == "N" then
	 tempfile.writeLine("false")
	 tempfile.close()
	 xifBasic()
	 end
  end
end

edit, i was tired so i accidently included the MMTh parts of the code lol, removed
Expenox #16
Posted 23 November 2012 - 05:35 AM
Cool!
Laserman34170 #17
Posted 24 November 2012 - 04:34 AM
well see in tekkit if you do isColor() it will error out.
To solve that problem you just use os.version() That should work

if os.version() == "CraftOS 1.4" then
  --do stuffs with term.isColor()
else
  --do other stuffs without term.isColor()
end
ArchAngel075 #18
Posted 24 November 2012 - 04:56 AM
well see in tekkit if you do isColor() it will error out.
To solve that problem you just use os.version() That should work

if os.version() == "CraftOS 1.4" then
  --do stuffs with term.isColor()
else
  --do other stuffs without term.isColor()
end

oh derp that is true ;)/>/>
well either way works but Lasermans is now WAY much cleaner -_-/>/>
inventor2514 #19
Posted 24 November 2012 - 05:14 AM

local function useColor()
if term.isColor then
  if term.isColor() then
   return true
  end
end
return false
end

if useColor() then
-- use color
else
-- don't use color
end

Works with old versions and non-advanced computers.
tom2018 #20
Posted 26 November 2012 - 05:29 AM
o_o just wait until theres so many OS' out there that someone takes up ASS OS
I just code for fun and that's really what the mod is about if people don't want an OS I don't really care.
MemoryLeak21 #21
Posted 11 December 2012 - 12:22 PM
The hell?
tom2018 #22
Posted 11 December 2012 - 01:26 PM
The hell?
what?
MemoryLeak21 #23
Posted 11 December 2012 - 01:43 PM
There was some guy who randomly posted like three times about Beats by Dr. Dre. It's removed now, but that was weird anyway…
tom2018 #24
Posted 16 December 2012 - 11:15 AM
do not worry the internet part will be fixed soon currently i am trying to use firewolf/firefox for the browser replacing my not very well done version
tom2018 #25
Posted 17 December 2012 - 04:48 AM
:)/> I suggest parallel emailing! That way people can send emails to any computer at any time without relying on a server to host it!
The client can be the server at the same time and there could be a gui saying
"Message Received!" :P/> it'd be neat
I will think about adding this but we currently use client-server setup so that I can make people pay for email on server XD.