Scripting Blog [archived]

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

How Can I Separate Hours and Minutes in a Date-Time Value?

(image) Hey, Scripting Guy! In determining system uptime I get back a value like 65.75 hours. How can I convert this value to "65 hours and 45 minutes"?-- JM(image) (image) (image) Hey, JM. We’ll see what we can do for you, but we have to be honest: this is a very sad day for the Scripting Guys. Thanks to the baseball playoffs the ...

How Can I Extract the Text Between the Header and Footer in a Text File?

(image) Hey, Scripting Guy! How can I extract the text between the header and footer in a text file?-- LL(image) (image) (image) Hey, LL. Before we answer your question we should point out that, depending on when you’re reading this, you might be missing Day 1 of Windows PowerShell Week. Even as we speak the lovely and talented Jean Ross ...

How Can I Run a Macro After Opening Up Word?

(image) Hey, Scripting Guy! How can I run a specified Word macro after opening Word using a script?-- JD(image) (image) (image) Hey, JD. You know, when they first tested the atomic bomb a number of physicists had legitimate fears that the bomb might set off an unstoppable chain reaction that would end up destroying the entire world. We have ...

How Can I Keep the Screen From Updating While Running an Excel Script?

(image) Hey, Scripting Guy! I seem to recall that there’s a way to “freeze” the display in Microsoft Excel any time you carry out a lengthy operation; that way the user doesn’t see anything change until the operation is complete. Do you have any idea how I can do that?-- IW(image) (image) (image) Hey, IW. Do we have any idea of how ...