Saved Bookmarks
| 1. |
Solve : Batch file editing? |
|
Answer» Quote the word document has the prompts for the batch fileI don't get it. Why are a few batch file exercises "prompts"... Quote correction I gave simple and straight forward prompts that I ask you to interpret into batch script.I see. The program itself is a simple text editor that happens to be able to run the program via the SHELL. There are a few issues with this idea: -It's not new. Or revolutionary. I think a good portion of those who work with batch files and deals with other programming languages writes a batch file editor at some point. -It's text editing capability is limited. The only thing going for it is the ability to save and run the file via terminal, but you can setup notepad++, Editpad, Sublime text, and various other programs to do the same; they can also capture the output to a new window/text file. Those editors also have more versatile editing functions, options and syntax highlighting, too, line numbers, and (for some)code folding. -It really really seems like you are TRYING really hard to get somebody to do your batch file homework. Basically, while this is an interesting practice project, you aren't going to be proving that you can speed up the editing of Batch files since it doesn't really do so. Bugs and Issues: -if Defualt.bat doesn't exist in the current directory, an unhandled exception occurs. This is because you've accidentally doubled the slashes after the drive specification in the catch block. Additionally, the path is hard coded as C:\Program Files\BatPad. - the temporary file is never deleted. -Save acts as a Save As. Save As MENU option exists but is invisible. a Save option should only act like Save As if the text has no file, otherwise it should save to the same file. -the "Run" toolstripItem's image doesn't have a transparent background. -not visible running the program, but the code has a LOT of redundancies. I count at least 2 complete sets of the toolstrip event routines. -If you want to compete with Editpad, Notepad++, sublime text, etc- your undo/redo needs to be done with a stack. This may be beyond your capability in the shorter-term of the project (same with syntax highlighting) so I would suggest perhaps revising your goals for the project to something more attainable.I agree with pretty much everything that BC said. You should work on adding intellisense or syntax highlighting so that there is something that sets it apart from being a notepad with a button that shells a batch file. Also, since you are probably not using all of the features of .NET 4, you should probably change to .NET 2 or 3 so that XP users don't have to install anything to run it. A long time ago, when I first started programming in VB6, I made a program like yours except it was for vbscript instead of batch. Another thing that would be easy to do would be to create a set of command line programs in the same directory that could act as a sort of "highbrid" batch language that has certain commands that you implement. I know this sounds kind of junky, but you could even implement an "include" command that wouldn't actually be written to the outputted batch file, but would tell the program what exes to include with the batch to extend the language. Then when you "compile" the code, it could copy it into an executable ARCHIVE so it appears as if you made your own language lol. You probably shouldn't do that |
|