Microsoft introduced HTML Applications (HTAs) in Internet Explorer (IE) 5.0, so it's been around for a while. For me, at least, it was a nice little jewel tucked away awaiting discovery: HTA came to my attention when I decided to look into what those Microsoft Scripting Guys were using to run their Scriptomatic 2.0 tool.
An HTA is mainly just an HTML page with an .hta extension. However, an HTA isn't subject to the tight restraints or security constraints of an HTML page. Think of HTA as a wrapper for your VBScript scripts. You can use HTML code to create a slick UI to gather user input, and the user can perform actions simply by clicking on specific buttons that run your embedded VBScript subroutines.
My August 2005 article about HTA UIs, "Hooked on HTAs," (InstantDoc ID 46795) laid out the basics of the HTA structure and coding elements and demonstrated a simple input screen that had two input fields and two buttons. This article shows you how to set up more-versatile UIs that you can use to drive your VBScript scripts and utilities. We'll look at the HTA window and the various objects that you can employ to interact with the user. I'll also show you how to associate your VBScript subroutines with buttons. . . .
Why become a VIP member?
 |
VIP-only online access |
 |
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library |
 |
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine |