InterviewSolution
Saved Bookmarks
| 1. |
Solve : Modifying Notepad? |
|
Answer» So I want to modify notepad to double as a batch compiler. I am having trouble finding source code. I was wondering if anyone new where I might find some (that I can easily compile). Thanks in ADVANCE. (I looked into Notepad++, but can't open most of the files for some reason)Microsoft Windows Notepad is proprietary software (and thus, you will NOT find source code for it). Microsoft Windows Notepad is proprietary software (and thus, you will NOT find source code for it).I was hoping to make a notepad like program that would have an option (like save or save as) that would say something AKIN to "Compile and run" that way I would not have to open Windows Explorer after saving and find my batch file. I started to write my own, but I know so little of any other language (than batch) that I'm running into some difficulty. I figured it would be simpler to get someone else's code and work my way though making a few edits than to write it from scratch. EDIT: So far (in c++) i have a window, with a menu bar (that doesn't do anything yet), and a giant text box. Still working on saving.Notepad++ has options (from the Run menu) to open the folder containing the file or a cmd prompt in the current folder (which I think may be the containing folder as well). Another option is to Run -> Run... (F5) this command: Code: [Select]$(FULL_CURRENT_PATH) (You can save it and add a hotkey, I used Shift-F5, if you use it a lot) Again, compiling literally does not make any sense with batch files by themselves. There are some third-party tools that 'convert' bat files to exe files (not that one should necessarily use one). What is the end goal? To write your compiled programs from source? I use VISUAL Studio for that. Downloading an IDE/compiler to compile c++ to make your own IDE/compiler is... how do I say... a lot of extra (and IMHO unnecessary) work.Quote from: TechnoGeek on December 10, 2012, 06:53:34 PM Again, compiling literally does not make any sense with batch files by themselves. There are some third-party tools that 'convert' bat files to exe files (not that one should necessarily use one). I guess I wasn't exactly using "compile" correctly. What I ment was that I wanted it to save it as a .bat (directly from my text editor) and run that .bat. That way I could eliminate Windows Explorer all together and overall save TIME. Quote from: TechnoGeek on December 10, 2012, 06:53:34 PM Notepad++ has options (from the Run menu) to open the folder containing the file or a cmd prompt in the current folder (which I think may be the containing folder as well). This is pretty much what I was looking for. Thanks for the help.Glad I could help and that the solution met your needs I believe N++ has a plugin that puts an icon on your toolbar. You just click it and it runs your batch file. I used it on my Windows XP computer with N++ but I just got SWITCHED over to Windows 7 and haven't gotten everything loaded back on at work. |
|