AutoHotkey Community

It is currently May 27th, 2012, 4:04 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: January 25th, 2006, 1:51 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2006, 2:41 pm 
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.


:lol: 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...


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group