Scripting Blog [archived]

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

How Can I Locate a Word in a Text File and Then Echo Back That Word and Any Remaining Text?

(image) Hey, Scripting Guy! How can I search for a word in a text file and then, after I find it, echo back that word and any remaining text in the text file?-- KA(image) (image) (image) Hey, KA. Before we begin we’d like to thank the hundreds and hundreds of people who have sent Scripting Guy Jean Ross get well wishes after her ...

How Can I Search a Text File for Strings Meeting a Specified Pattern?

(image) Hey, Scripting Guy! How can I search a text file of product IDs and retrieve just those lines that meet a specified pattern?-- WT(image) (image) (image) Hey, WT. Before we get to today’s question we were wondering if anyone else has seen the commercial for the car that features the all-new “heartbeat sensor?” The idea is that...

How Can I Change the Color of the Scrollbars in an HTA?

(image) Hey, Scripting Guy! How can I change the color of the scrollbars in an HTA?-- IR(image) (image) (image) Hey, IR. How many times have you thought to yourself, “Gee, the Scripting Guy who writes that column is so smart; how come he isn’t rich?” (OK, true, you’ve probably never thought that. But just play along, OK?) Well, it ...

How Can I List All the Members of a Microsoft Outlook Distribution List?

(image) Hey, Scripting Guy! How can I list all the members of a Microsoft Outlook distribution list?-- KH(image) (image) (image) Hey, KH. You know, that’s an interesting question. As it turns out, you can – ow! Hey, let go! Ow! Stop it! Come on, give us a chance; we were just about to tell them! Ow! Um, excuse us. It has come to our ...

How Can I Use Windows PowerShell to Be Notified When an Application Terminates?

(image) Hey, Scripting Guy! We have an in-house application that, unfortunately, crashes a lot; when that happens we have to go through a lengthy procedure to restart the program. Using Windows PowerShell, is there any way I can be notified when this application crashes?-- OI(image) (image) (image) Hey, OI. You know, at first we thoughts ...