Back to svrman's Blog ( Created 31 May 2007 | Last Edited 31 May 2007)|
Easiest way to make an app?
|So basically as I've been crawling through several forum archives, I stumble upon this relatively unknown and little talked about file format.|
Now I did say archives so this has been around for a while, don't get me wrong but it's pretty new to me
So for those who still have no clue as to what exactly a .hta file is, this is for you.
It's basically a html file as an stand alone application.
An app where you can strip the borders, menus, disable context menu (right click menu), set your own icon and start minimised/maximised/windowed.
You even set it to either show in taskbar when minimised or not - giving you the ability to hide the app upon launch... sneaky
However, this is only possible because the hta is a file running off the IE browser engine and thus is only available on the windows platform. The hta file is also dependent on the IE browser version currently on the enduser's system.
I'll admit I haven't read too much into it and not sure what version of windows are compatible.
So how do you make a hta file?
Simplest. way. ever. You rename the file extension. Wow. I wish they did that for all apps lol.
ex. index.html -> index.hta
Here's something you could try, save this bit as index.hta (I promise there's no malicious code here )
if you want to view in the browser, rename the hta to html.
Well anyway you could alway use it for presentation stuff and over bloat it with Ajax scripts.
Reference on .hta can be found here.
|Posted : Thursday, 31 May 2007, 01:50|
|I don't get it..|
Other than the ability to hide the fact that it's a webpage, what other use is there?
I mean, when you can just as easily "run" a html file, and then let the OS's settings decide what it runs on, then why not just do that?
|Posted : Thursday, 31 May 2007, 04:13|
|I think the purpose is that it hides the fact that it's a webpage - you can use the browser engine without needing to display the browser.|
I was actually thinking about Steam - Valve's content delivery system as it works to that effect. In fact, If I'm not mistaken I think it does use the IE engine.
Well anyway it's just one of those things you go "Oh, cool. Nice to know" and then never speak of it again
|Posted : Thursday, 31 May 2007, 05:14|
|Urm, i dunno why, but the program killed my computer, as it kept coming up with errors |
|Posted : Thursday, 31 May 2007, 06:00|
|Hmm It shouldn't but I'd expect it's your version of IE. Upgrade to 7 and all should be good.|
|Posted : Thursday, 31 May 2007, 06:21|
|I thought there were already far more common ways to hide browser stuff on a web page.|
I got loads of script problems too, and I'm running the latest IE 7 on Vista! What's really scary though, is how on Vista the right-click options off the task-bar are disabled. Making it slightly harder to close.
|Posted : Thursday, 31 May 2007, 06:47|
|Well that's interesting. Perhaps MS have removed support for it in vista? I can understand if they did because the .hta isn't subjected to the same security protocols as a html through the IE browser.|
Anyway the code I posted was just demonstrating ways you could use the DOM in the app.
I've just reposted - it's all you need to get a .hta to work.
|edit| Set border="normal" to enable the min/max/close buttons |edit|
|Posted : Thursday, 31 May 2007, 12:04|
|That's awesome! I never knew about these!|
|Posted : Thursday, 31 May 2007, 12:11|
|Hey, thats quite cool.|
|Posted : Thursday, 31 May 2007, 16:01|
Jayenkai I mean, when you can just as easily "run" a html file, and then let the OS's settings decide what it runs on, then why not just do that?
Because then I can do pretty things like this!
Anyone who may want it, use and edit freely.
|Posted : Sunday, 03 June 2007, 12:00|
|WOW this is neat!|
|Posted : Sunday, 03 June 2007, 12:42|
|I think I'd still rather just make a normal application, and I believe many GUI's support using html in their code.|
That is quite cool, but the fact anyone can then edit it is still a bit of a down side.
|Posted : Sunday, 03 June 2007, 18:43|
|ahh. yes your are right diablo....|
|Posted : Sunday, 03 June 2007, 19:00|
|I dunno, on the otherhand that's kind of an upside. If I don't like a HTA program (for example, if they use a stupid font), I could tweak it to make it better. Or, I could tinker with it and learn from it.|
And, it's less expensive than Visual Basic