Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

From time to time I find myself using Notepad instead of Notepad++ or a better editor. Sometimes I even put important stuff in those notepad windows.

When it comes time to restart my PC, I often have as many as 20 open notepad instances. Granted, most of these are useless, but I have to scan each one to see if there is anything worth saving.

Is there any utility or command available that would do any of the following:

  1. Save all open notepads to a single file
  2. Save all open notepads to default named files
  3. Save the instances of notepad in memory to disk so they start on reboot
share|improve this question
    
:) i do all of these with notepad++ –  Baljeetsingh Sucharia Mar 15 at 2:06

1 Answer 1

Yes, there is AutoHotKey tool suitable for such a task.

You can create a macro which repeatedly

  1. focuses any window with word Notepad in title (or exits if no such window is found)
  2. sends Ctrl+S to save a file
  3. waits few seconds
  4. if it finds (again by title) "Save as" dialog open (that is, in case of saving of new file), it fills in some default numbered filename (by sending keystrokes) and sends Alt+S to press Save button in dialog
  5. adds command notepad <filename> into restore-notepads.bat file
  6. sends Alt+F4 to close Notepad instance
  7. repeat.

then you can add restore-notepads.bat into your Startup menu and you will find the functionality you described as "3.Save the instances of notepad in memory to disk so they start on reboot" present.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.