Latest Uploads
Extraterre ... .0.1 (zip)

dantheman363

Monty Teas ... Screenie 1

steve_ancell

Santa Clau ... ed his bag

waroffice

manic_platdude.png

spinal

Tetris Clone

steve_ancell

Super blues bros.

spinal

Back to svrman's Blog ( Created 31 May 2007 | Last Edited 31 May 2007)
.hta files
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

And because the app is basically a html file, it benefits from being able to be customised with CSS, run javascripts and connect to the internet.

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.

Fun

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.

Latest Comments

Posted : Thursday, 31 May 2007, 01:50
Jayenkai


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
svrman


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
TheMadProff


Urm, i dunno why, but the program killed my computer, as it kept coming up with errors

Posted : Thursday, 31 May 2007, 06:00
svrman


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
JL235


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
svrman


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
HoboBen


That's awesome! I never knew about these!

Calculator program:
-->

Posted : Thursday, 31 May 2007, 12:11
mike_g


Hey, thats quite cool.

Posted : Thursday, 31 May 2007, 16:01
HoboBen


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
garand


WOW this is neat!

Posted : Sunday, 03 June 2007, 12:42
JL235


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
garand


ahh. yes your are right diablo....

Posted : Sunday, 03 June 2007, 19:00
HoboBen


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

The fact that you can use both JavaScript and VisualBasic Script, plus the elegant simplicity of HTML and CSS, and additionally not have to worry about different browsers beyond Internet Explorer version 5 to 7 is all pretty positive too.

Latest Posts
FIRST!!!
steve_ancell Wed 03:55
Position in Mind
steve_ancell Wed 03:51
Noel's Graduation
waroffice Wed 02:55
Monkey vs iOS tweaks
spinal Tue 22:51
Fucking Pound Sign Unicode Bullshit Bollocks
Dabz Tue 13:00
Progress / Location Bars
dna Tue 08:55
Screen Burn of the Mind
rockford Tue 02:13
RoadRash!
Mog Mon 10:56
Development via GUI
waroffice Mon 02:48
Audio Rant
steve_ancell Sat 19:16
More

Latest Items
News : Newsletter #176
Jayenkai Sat 04:49
News : Newsletter #175
Dabz Tue 09:38
Blog : Snow: More Material Junk
Cower Sat 23:17
Dev-Diary : Mutant Monty: Amstrad CPC to Windows conversion
rockford Fri 13:14
Techy : AppleTV
Jayenkai Thu 09:40
Blog : Graphviz
steve_ancell Sat 14:17
Pets : Top-Down Shadow Hack
Jayenkai Tue 05:52
Snippet : JNKrunch v1.0
Jayenkai Sat 07:20
News : Newsletter #173
waroffice Fri 04:47
Blog : Material Loading
Cower Fri 02:08
Pets : I Done Won A Thing
shroom_monk Sun 11:31
Pets : Repurposing A Lexer
Cower Mon 22:06
Bah : Feeling a Little Angry
spinal Mon 11:26
News : Newsletter #170
Dabz Sat 00:34
Showcase : sbfgen
Cower Sat 16:57
More

Who's Online
Jayenkai
Wed, at 04:03
steve_ancell
Wed, at 03:57
Afr0
Wed, at 03:54
spinal
Wed, at 03:47
waroffice
Wed, at 03:10
CodersRule
Wed, at 03:01
HoboBen
Wed, at 02:56
Hotshot
Wed, at 02:45
blanko1324
Wed, at 01:20
Cower
Wed, at 00:28
Link to this page
Site : Jayenkai 2006-Infinity |
MudChat's origins, BBCode's former life, Image Scaler.