Interesting bit: HTA’s

Learning HTML has more application than just building websites. It’s also the language of HTAs.

HTAs are HTML pages that run as windows-based applications and aren’t constrained by browser security.  They’re essentially applications written in HTML and/or some scripting language that can access Windows Task Manager and be used for opening programs, interacting with your operating system, and more.  They can be stylized to look just like an application (with their own options for icon, menu bar, size, etc.), but are entirely coded in HTML. 

You can see one in action for yourself.  Just save any html file on your windows-based machine with the extension .hta and open it.

So how are HTA apps different from HTML?

In addition to allowing HTML code, HTA’s provide a space for references in the HEAD tag to define the style of the application. 

For instance, the following code will define the icon for the HTA, the default window state, and whether or not it shows in the task bar:

<HEAD>
 <TITLE>My Sample Application</TITLE>
 <HTA:ICON=”/graphics/creature.ico”
 SHOWINTASKBAR=”no”
 WINDOWSTATE=”maximize”>
</HEAD>

For a full list of references, visit:
http://msdn.microsoft.com/en-us/library/ms536473%28v=VS.85%29.aspx

After defining the references, you can do everything in an HTA you can in HTML.  You have full access to CSS, HTML, Javascript, VBscript, etc. which you could use to build the functionality and design of your app.

In terms of functionality, the limit of the application is solely defined by the limit of your scripts.  To get an idea of the sort of app you can develop, check out The HTA Helpomatic which will automatically generate usable source code for you (not to mention it’s an HTA itself!)

So what kind of projects are HTA’s good for?

  • Creating quick links for applications and web links in one interface
  • Creating an interface for network admins to run common scripts
  • Launching applications in an autorun menu

. . . and plenty more.