Page 1 of 1

Command Lines?

Posted: Sun Jan 06, 2008 11:17 pm
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?

Re: Command Lines?

Posted: Sun Jan 06, 2008 11:21 pm
by Prey
Build> Properties> Build Events

Re: Command Lines?

Posted: Sun Jan 06, 2008 11:33 pm
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.

Re: Command Lines?

Posted: Fri Feb 22, 2008 4:44 am
by GoldBl4d3
what did you set the keys object to, Example if it were the form then make sure the form have focus

Re: Command Lines?

Posted: Fri Feb 22, 2008 3:54 pm
by OwnZ joO
With console I think you want to perform a readline, havent worked with it much though.

Re: Command Lines?

Posted: Fri Feb 22, 2008 4:54 pm
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.

Re: Command Lines?

Posted: Fri Feb 22, 2008 11:24 pm
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

Re: Command Lines?

Posted: Sat Feb 23, 2008 12:09 am
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.