Scripting Blog [archived]

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

How Can I Clear the Contents of Any File Dropped on My Script Icon?

(image) Hey, Scripting Guy! How can I write a script that will clear the contents of any file that I drag and drop on the script icon?-- SN(image) (image) (image) Hey, SN. Say, you didn’t by any chance misplace a few hundred thousand insects did you? OK; just thought we’d ask. This past weekend the Scripting Guy who writes this column ...

How Can I Pass a Drive Letter From a Script to the Command Shell?

(image) Hey, Scripting Guy! How can I pass the drive letter of a drive from a VBScript script to the command shell that called that script?-- JF(image) (image) (image) Hey, JF. You know, as kids grow up they pass through a phase where they believe that their parents are capable of doing – and of fixing – anything. Admittedly, children ...

How Can I Run a Windows PowerShell Script from the Run Dialog Box or a Shortcut?

(image) Hey, Scripting Guy! How can I run a Windows PowerShell script from the Run dialog box or from a shortcut? In the Run dialog box I type something like c:\scripts\test.ps1 but my script just opens up in Notepad.-- RS(image) (image) (image) Hey, RS. We have just one thing to say: University of Washington 29, UCLA 19. And this after ...

How Can I Cause a Script to Run Inside an HTA Any Time a User Presses ENTER?

(image) Hey, Scripting Guy! How can I cause a script to run inside an HTA any time a user presses ENTER?-- JJ(image) (image) (image) Hey, JJ. Before answering your question we should state, for the record, that the Scripting Guys are unanimously opposed to the recent decision by the International Astronomical Union (IAU) to remove Pluto ...

How Can I Minimize or Hide an HTML Application for 30 Seconds?

(image) Hey, Scripting Guy! How can I minimize or hide an HTA for 30 seconds?-- MF(image) (image) (image) Hey, MF. You know, with the possible exception of baseball, the Scripting Guy who writes this column rarely claims to know much about anything. And for good reason: every time he thinks he knows something, well …. Take your question...