Scripting Blog [archived]

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

How Can I Determine How Long It Takes a Script to Run?

(image) Hey, Scripting Guy! Is there a good way to time how long it takes for a script to run? -- BN, Montreal, Canada (image) (image) (image) Hey, BN. Probably the easiest way to do this is to let the script time itself. To accomplish that feat, set the first line of the script to this: This code simply sets the value of the variable ...

How Can I Get Yesterday’s Date?

(image) Hey, Scripting Guy! I’m writing a script, and I need to know yesterday’s date. I can use Date() to figure out today’s date, but how do I figure out yesterday’s date?-- SS(image) (image) (image) Hey, SS. You’re right; it’s easy to determine today’s date using a script: But what about yesterday’s date? Listen, we’ve ...