I have some days working on an HTA application. I want to control it throught LabVIEW.
There are possible solutions:
But for some reason functions from User32.dll does not work for this application, for example if I list the opened windows, the hta application is not visible.
So i did some tricks to make the window active, added "ALT + letter" shortcuts to each button i need to use, so I can control it on that way. If the hta is updated, i need to do some changes to the code.
My tests here didnt worked. I need to delete all HTML code from the HTA and do some replacements to read the script file. But when i call fucntions i had errors that I cant fix.
There are errors when loading the hta (renamed as htm to open it here). I tried to load the original hta as htm, and also the modified hta file, but got same errors.
¿Can someone recommend another way to do this?
Also if someone knows how to make work user32.dll functions with this application, would be realy useful.
Problem here is that i dont know a way to get the hta application window handle. I did research in google but didnt find someone that know how to do this.
So I dont have a way to use it with user32.dll or AutoIt.
Thanks by your help, I didnt knew about AutoIt so this helped me to learn something new.
My solution was to do some changes to the hta file. Then replace files path in the code, open it in LabVIEW and add task automatically by code.
When the HTA finished and labview need to do some actions, what i did is change the hta window name. LabVIEW is waiting for this, so when it found the waited name, do some actions and then give control again to HTA using keyboard event. Then the hta close it itself.