Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Tally Up All the Words Found in a Text File?

(image) Hey, Scripting Guy! While browsing the Internet I found a script that showed me how to get a list of all the unique words in a text file. That’s useful, but I’d like to go one step further: how can I determine the number of times each of those words occurs??-- TZ(image) (image) (image) Hey, TZ. As it turns out, that’s a lot ...

How Can I Monitor Event Log Messages for Specific Words?

(image) Hey, Scripting Guy! How can I monitor event log messages for a specific word or phrase?-- GH(image) (image) (image) Hey, GH. You know, now that the 2007 Scripting Games are over (have we mentioned that the 2008 Games are just a year away?) it’s time for the Scripting Guys to rejoin the real world. Before we answer your question, ...

How Can I Add the Last-Saved Date to the Footer of a Microsoft Word Document?

(image) Hey, Scripting Guy! How can I put the date that a Microsoft Word document was last saved in the footer of that document? Oh: and how can I center that footer while I’m at it?-- GH(image) (image) (image) Hey, GH. Well, the best way to go about – say, wait a second here: that sounds suspiciously like two questions, one about ...

How Can I Tell If a Script is Running on the First or Second Monday of a Month?

(image) Hey, Scripting Guy! We have a logon script that needs to perform certain tasks only on the first and second Mondays of the month. How can I determine whether the script is running on the first or second Monday in a month?-- WA(image) (image) (image) Hey, WA. You know, a few months ago the Scripting Guy who writes this column ...

How Can I Return Information For Each Member in a Group?

(image) Hey, Scripting Guy! How can I write a script that, for each member in a group, returns the member’s name, department, address, title, and description?-- TL-V(image) (image) (image) Hey, TL-V. You would have to mention the word “script,” wouldn’t you? Usually that wouldn’t bother us too much, but in the past 9 days or so ...