Forum Moderators: open

Message Too Old, No Replies

HTA Variable Passing

         

adni18

7:37 pm on Mar 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey...

I'm working on a game written in Javascript (using HTA's) and I have a separate HTA which is used as a sort of development console, which reads log files outputted by the main game HTA, and displays them. The problem is that oftentimes the console HTA will try to read the logfile when it is being written to and result in a read error, etc. and it's just plain slow. Is there any other way to pass variables between HTAs which doesn't involve external files?

Thanks,
adni18

adni18

5:28 pm on Mar 31, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No ideas? :-/

poppyrich

6:16 pm on Mar 31, 2008 (gmt 0)

10+ Year Member



Use the clipboard. (clipboardData object)
HTA's are privileged - no "Allow Access" box will pop up. Unfettered communication. Just make sure you label the data so some other program doesn't write to the clipboard and intrude.

Also, you can forego using an HTA for the logging window. Open up a regular instance of IE - because it's being opened by an HTA, you'll also be allowed some leeway as far as the chrome is concerned, too.
Information can be passed back and forth using the window.opener object.

Opening up a modalDialog window might work as well but I've never tried it.