User Commands

Nov 25, 2010 at 5:44 AM

Hi,I'm creating a operating system and I would like users to type in commands.

For example, If my user types in "help" its shows a list of commands

or if my user types in "shutdown" the Computer will shutdown.

I just don't want my user to be able to type in one command I want many commands. 

So mostly  I just need code for users to type in commands and something will happen.

Please supply me code.

Nov 25, 2010 at 7:11 AM

There are samples in the dev kit. Take a look at the Guess demo, for instance. If you need anything more than that, you probably need C# or .NET help, rather than Cosmos help, so I'd suggest using Bing or asking at http://stackoverflow.com/.

Nov 25, 2010 at 6:35 PM

what dev kit

Coordinator
Nov 25, 2010 at 8:06 PM
devkit = development snapshot

On 11/25/10, stevenator <notifications@codeplex.com> wrote:
> From: stevenator
>
> what dev kit
>
>
Nov 26, 2010 at 11:08 PM

I need the code for that

Nov 27, 2010 at 5:57 AM

It's under the "Source Code" tab.

Dec 24, 2010 at 11:20 AM

Soooo... Nobody actualy posted the code so I will.

...

TER:

//thefunction or whatever it is called

string com = console.readline();

//Basic input

if (com = "shutdown")

{

Cosmos.Sys.Deboot.Shutdown();

//the shutdown

}

if (com = "about")

{

Console.WriteLine("This is an os. Made by someone.")

//puts "This is an os. Made by someone." on the screen.

goto TER

// goto TER returns to the start of TER so the user can type commands more times.

}

...

Okay thats it, post if you want more help.

 

Developer
Dec 24, 2010 at 3:31 PM

well, goto joshdos.codeplex.com, is is made for people just like you, stevenator