Jump to content




A Sample OS - For those beginners...


  • You cannot reply to this topic
26 replies to this topic

#1 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 17 January 2013 - 08:02 AM

So I made a simple Sample OS for anyone (mostly beginners) that can be used in anyway one pleases.
Not sure if this should go into general or here, but oh well :P/>

What does it have?
  • Advanced functions for the most efficient non-flicker display.
  • A start menu with:
    • Your own list of programs
    • A help option that displays all the text in the table with the text (you'll know if you look at the code) with:
      • Scroll feature
    • A reboot option
    • .. More of your own can be added by adding more options into the t_startMenu["main"] table
  • Time at the top right
  • Advanced right-click popup menu.
Code:
Pastebin: Sample OS
I added as many comments as I could... If you still need more explaining, feel free to ask here or PM me.

Screenshots:

Spoiler

I'll probably not be updating this because there's probably not much I can add for an 'example/sample' OS, but you may request something if you need.

Well.. enjoy :P/>

#2 pielover88888

  • Members
  • 66 posts
  • LocationIn a library that's in a village, huddling my advanced computer as zombies bang on the door.

Posted 17 January 2013 - 12:29 PM

Screenshots? And..wow this kicks my os's butt. :|

Good job, lol!

#3 imef

  • Members
  • 18 posts
  • LocationFrance

Posted 17 January 2013 - 01:58 PM

This certainly has some potential. You should keep on working on that!

#4 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 17 January 2013 - 06:15 PM

View Postpielover88888, on 17 January 2013 - 12:29 PM, said:

Screenshots? And..wow this kicks my os's butt. :|

Actually didn't think of adding screenshots :P Will add some now...

View Postimef, on 17 January 2013 - 01:58 PM, said:

This certainly has some potential. You should keep on working on that!

There are so many OS's out there and I really don't feel like keeping something up to date at the moment, I just started my Matric year so I won't have much time.

#5 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 17 January 2013 - 06:21 PM

View PostremiX, on 17 January 2013 - 06:15 PM, said:

I just started my Matric year so I won't have much time.
Matric year.... I'm not familiar with that... what is it?

#6 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 17 January 2013 - 06:22 PM

View PostTheOriginalBIT, on 17 January 2013 - 06:21 PM, said:

View PostremiX, on 17 January 2013 - 06:15 PM, said:

I just started my Matric year so I won't have much time.
Matric year.... I'm not familiar with that... what is it?

Pfft :P

#7 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 17 January 2013 - 06:34 PM

View PostremiX, on 17 January 2013 - 06:22 PM, said:

Pfft :P
Its ok... I know now... Helps if i read the correct link off Google :P

#8 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 18 January 2013 - 09:58 AM

Looks like there aren't any more beginners that need guides / help :lol:

#9 Getalife

  • Members
  • 6 posts

Posted 19 January 2013 - 07:25 AM

This is cool :) I've been trying to make my own OS and I'll probably base it off this, thanks!

#10 Mandrewx

  • New Members
  • 5 posts

Posted 19 January 2013 - 12:47 PM

Kind of a noob-ish question... But how do I make the program execute anything and- or run a different file?

Great OS, though. Makes things a lot easier for us noobs. : )

#11 DarkenedEvil

  • Members
  • 59 posts

Posted 19 January 2013 - 03:38 PM

there are different ways you could do this mandrew. I like to use shell.run(program name) but you can also use os.run({},program name) for example:
term.clear()
term.setCursorPos(1,1)
print("Enter a program name.")
write("> ")
local program = read()
shell.run(program)

OR
print("Running startup!")
shell.run("startup")


#12 Mandrewx

  • New Members
  • 5 posts

Posted 19 January 2013 - 10:33 PM

Yeah, I know the basics and whatnot. : ) Thing is, I want to make the program buttons in the OS activate a command and- or a different program.
Bit hard, you see. Thanks anyway. : )

Edit:
Probably should have specified that before. Terribly sorry, DarkenedEvil.

#13 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 20 January 2013 - 01:09 AM

Oh, do you mean for the right-click popup menu, or within the start?

This can be used for the popupmenu:

bValidClick, option = popupMenu(e[3], e[4], colours.black, colours.lightBlue, "Option1", "Option2", "Option3")
--[[ Add an if, elseif, end statement here for
each option and what it must do
--]]
if bValidClick then -- so it only does this code if it was a valid click.
	if option == "Option 1" then

	elseif option == "Option 2" then
	-- Say now option 2 is an option to run a program
	shell.run("programName")
	elseif option == "Option 3" then
	
	end
end


#14 Mandrewx

  • New Members
  • 5 posts

Posted 20 January 2013 - 01:28 AM

Thanks for that popup-thing. I meant when you've clicked Start and opened Programs and click on one of the listed programs there. : )

#15 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 20 January 2013 - 02:34 AM

Oh! I'll need to change that then, the programs that show up aren't clickable, it just lists what it does.

Let me do this and I'll get back to you.

#16 Mandrewx

  • New Members
  • 5 posts

Posted 20 January 2013 - 03:39 AM

View PostremiX, on 20 January 2013 - 02:34 AM, said:

Oh! I'll need to change that then, the programs that show up aren't clickable, it just lists what it does.

Let me do this and I'll get back to you.

You're a lifesaver! : ) Been learning snippets and bits of LUA and whatnot lately, and so far your OS is quite the helper. : )

#17 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 20 January 2013 - 06:08 AM

View PostMandrewx, on 20 January 2013 - 03:39 AM, said:

View PostremiX, on 20 January 2013 - 02:34 AM, said:

Oh! I'll need to change that then, the programs that show up aren't clickable, it just lists what it does.

Let me do this and I'll get back to you.

You're a lifesaver! : ) Been learning snippets and bits of LUA and whatnot lately, and so far your OS is quite the helper. : )

I'm busy with the changes now and it actually requires me to change quite a bit. I'll be out tonight so i'll only be done tomorrow :)

#18 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 20 January 2013 - 11:20 AM

Check the pastebin link in the OP, and add programs within the t_startMenu["programsMenu"].programs table with the programs it must list :) If there are more than 16 programs, it allows scrolling :)

#19 Mandrewx

  • New Members
  • 5 posts

Posted 20 January 2013 - 01:36 PM

You are a god. : ) Thanks a lot, mate.

#20 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 20 January 2013 - 08:28 PM

Haha why thank you :P

Enjoy it





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users