Monday, October 16, 2006

Notepad tips and tricks

Like most people, I use notepad when I need to put together a script. I never actually looked at the help file for notepad (well, why would you?!?) until I hit the F1 key by accident recently. As a result I found quite a few tricks that notepad provides that I never knew existed. They are turning out to be pretty helpful so I thought I'd share them below:

When editing a file, press the F5 key to insert the system date and time
Change or add headers & footers by selecting file page setup
Press ctrl-G and enter a line number to go to (VERY useful when debugging VBScript errors)
Select view status bar to display the line/character number as you navigate the file (another beneficial debugging aid)

Another tip I found was the ability to maintain a log file with timestamps. This is useful when troubleshooting a problem where you need to record what is happening at specific times:

open notepad
set the first line to be (without the quotes and in uppercase) ".LOG"
press enter and save/close the file
every time you open the file, notepad will automatically insert the system date/time at the end of the file and add a new line where you can begin typing


1 comment:

Bert said...

By accidence I came along and saw this .LOG trick. Thanks a lot, it helps when you take notes a lot!!!

Grtz, Bert