Command Lines?

Discuss anything programming related.
Post Reply
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Command Lines?

Post by Grimdoomer »

I want to add a Command Promt to my app, so when I am testing things that take a long time to get to I could just use the cmd prompt. I also might leave it in for other features. What I am wondering is how do I add a cmd line to my currect project? do I just make a new cmd project and add it?
Don't snort the magic, we need it for the network.
User avatar
Prey
Posts: 129
Joined: Sat Dec 29, 2007 5:06 pm
Location: UK

Re: Command Lines?

Post by Prey »

Build> Properties> Build Events
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: Command Lines?

Post by Grimdoomer »

Yea but I want more of a console, so i could put in commands like Build Buildpath so it would build a tag into the map.
EDIT: I got it, and its so easy.

EDIT: Well now i cant get this dam keypress procedure to work.

I create a keypress meathod with the events window, then I add the folowing code:

Code: Select all

switch (e.KeyCode)
            {
                case Keys.F2:
                    {
                        //Run the Oracle Console
                        //new Oracle_Console.Program.Main();
                        MessageBox.Show("ggdfgg");

                        break;
                    }

            }
but when I press F2 it doesent work.
Don't snort the magic, we need it for the network.
GoldBl4d3
Posts: 18
Joined: Fri Feb 22, 2008 4:20 am

Re: Command Lines?

Post by GoldBl4d3 »

what did you set the keys object to, Example if it were the form then make sure the form have focus
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Command Lines?

Post by OwnZ joO »

With console I think you want to perform a readline, havent worked with it much though.
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: Command Lines?

Post by Grimdoomer »

Yea I know that, but the main problem is I need both the console project and my main project to have references to each other. But then I get an error about having a circle reference.
Don't snort the magic, we need it for the network.
GoldBl4d3
Posts: 18
Joined: Fri Feb 22, 2008 4:20 am

Re: Command Lines?

Post by GoldBl4d3 »

well I will try to do what your saying but, Trying referencing the 'Console' class in C# and maybe write to it (EX: Colsole.WriteLine(line to write);) idk if that will work but try,

and yes thed: Console.ReadLine(); function makes it so the command promt window doesnt close
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: Command Lines?

Post by Grimdoomer »

I got it all to work a long time ago, except that I cant add references to both projects because ill create a circle reference. So will never work.
Don't snort the magic, we need it for the network.
Post Reply