AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A Guide to HTML Applications (HTAs)

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Wed Jan 25, 2006 12:51 pm    Post subject: A Guide to HTML Applications (HTAs) Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
not-logged-in-daonlyfreez
Guest





PostPosted: Wed Jan 25, 2006 1:41 pm    Post subject: Reply with quote

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.


Laughing 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...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group