I know with the windows default programs you can add the /? option after the program name and get a nicely formatted help screen. What i have right now is that when the program is called with the /? or -h option, the console simply writes some text. But the problem is that it is all mis-formatted and no longer lined up...any ideas?
here's a snippit of my program. It's open source, if you want to check it out: http://www.sourceforge.com/projects/amake32
Code:Dim operation_type As String = args(1) Select Case operation_type Case "-h" Console.WriteLine("--------------------------------------------------") Console.WriteLine("amake32 version 0.5 created by techwiz24 (C) 2010") Console.WriteLine("--------------------------------------------------") Console.WriteLine("Mode " + args(1) + " [HELP]") Console.WriteLine("Usage: amake32 [Mode: -c -r -d -Ac -h (/?)] [Command (In quotes) If needed] [Name (no spaces)") Console.WriteLine("Options:") Console.WriteLine(" -c Mode Create, allows creation of windows aliases") Console.WriteLine(" -r Mode Read, reads the contents of the windows aliases") Console.WriteLine(" -d Mode Delete, deletes a windows alias, prompts for confirmation first") Console.WriteLine(" -Ac Mode assisted create, uses prompts to assist you with the creation of windows aliases") Console.WriteLine(" -h or /? Mode Help, shows this prompt") Console.WriteLine(" [COMMAND] The exact text of the command prompt command. If you need new lines, use the GUI version of the program") Console.WriteLine(" [NAME] The name of the alias, this is the name you will use to call the alias from the command prompt") Case "/?" Console.WriteLine("--------------------------------------------------") Console.WriteLine("amake32 version 0.5 created by techwiz24 (C) 2010") Console.WriteLine("--------------------------------------------------") Console.WriteLine("Mode " + args(1) + " [HELP]") Console.WriteLine("Usage: amake32 [Mode: -c -r -d -Ac -h (/?)] [Command (In quotes) If needed] [Name (no spaces)") Console.WriteLine("Options:") Console.WriteLine(" -c Mode Create, allows creation of windows aliases") Console.WriteLine(" -r Mode Read, reads the contents of the windows aliases") Console.WriteLine(" -d Mode Delete, deletes a windows alias, prompts for confirmation first") Console.WriteLine(" -Ac Mode assisted create, uses prompts to assist you with the creation of windows aliases") Console.WriteLine(" -h or /? Mode Help, shows this prompt") Console.WriteLine(" [COMMAND] The exact text of the command prompt command. If you need new lines, use the GUI version of the program") Console.WriteLine(" [NAME] The name of the alias, this is the name you will use to call the alias from the command prompt") End Select


LinkBack URL
About LinkBacks




Reply With Quote



Bookmarks