toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Wed Jan 25, 2006 12:51 pm Post subject: A Guide to HTML Applications (HTAs) |
|
|
I know BoBo has talked about HTAs several times before. But I never found a link to the basics of HTA. Since I just came around one, I wanted to post it.
Introduction to HTA
One of the very basic HTAs published on that site: | Code: | <head>
<title>HTA Test</title>
<HTA:APPLICATION
APPLICATIONNAME="HTA Test"
SCROLL="yes"
SINGLEINSTANCE="yes"
>
</head>
<script language="VBScript">
Sub GetOSVersion
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
DataArea.InnerHTML = objOperatingSystem.Caption & " " & _
objOperatingSystem.Version
Next
End Sub
</script>
<body>
<input type="button" value="Operating System" name="run_button" onClick="GetOSVersion">
<p>
<span id = "DataArea"></span>
</body>
|
_________________ Ciao
toralf  |
|
not-logged-in-daonlyfreez Guest
|
Posted: Wed Jan 25, 2006 1:41 pm Post subject: |
|
|
Nice, thanks for the link...
| Quote: | | You might have noticed that you can’t buy MS-DOS any more, and for good reason: after people got a look at Windows, well, typing in long, cryptic commands from the C:\ prompt just didn’t seem like nearly as much fun. The command prompt still has its place, but the success of Windows (and the Macintosh, and all the new Windows-like Unix shells) suggests that most people prefer a graphical user interface. |
They make it sound as if they invented graphical shells...
Tip:
If you get an error (like me) when trying to open/run a hta file, try the following:
- Open an Explorer window.
- Goto menu 'Tools' -> 'Folder Options'
- Goto tab 'File Types'
- Goto the HTA extension
- Press the 'Change' button at 'Opens with:'
- Press the 'Other...' button in the 'Open with' window
- Goto the Windows folder (or WINNT) -> system32 -> Pick 'mshta.exe'
- Press 'Apply' and 'OK'
Should work now... |
|