A handy Notepad script

After answering someone asking online for useful macros and scripts using AutoHotKey, it appears a little trick I’ve been using for years could be useful to others.

I tend to keep Notepad open most of the day for little tasks like de-formatting text or taking notes, but it’s annoying to bring up when I’m already typing. So I made a little script to do it without reaching for my mouse or alt-tabbing around.

When I hit tilde (`), the script launches Notepad with a new, untitled plaintext document if there isn’t one already. If I’m in another window or application, it will switch focus to that document. And if I’m already focused on Notepad, it will close the document (after confirmation). That’s all! It’s very simple and very useful. Maybe you can use it too. (Code after the fold.)

Read more