Posted by: mgpw4me
« on: December 30, 2011, 08:28:21 pm »I've been way too busy, so the following code is not even close to 'ready', but it does provide proof the method will work.
Some data about the activex component used is here:
http://www.the-art-of-web.com/javascript/ajax/
At the moment, what is does:
- Psf file invokes the HTA (HyperTExt Application)
- HTA uses GET to load the source code for the impawards.com index page into a textarea
- HTA can save the textarea to a file
- the activex component is 'standard' on windows xp and up...no install required
Known issues:
ActiveXObject('msxml2.xmlhttp') works for VISTA, other objects are used by other O/S's. The loadXMLDoc(url, params) subroutine shows how to connect to the correct object.
POST isn't supported by this code...at the moment...but it looks simple enough...in fact it could be possible to write a generic "read the <input> tags" routine to build most of the post variables on-the-fly.
Very unlikely this code will work on anything but a "genuine windows" install.
The FileExecute routine will NOT wait for the executable to finish before continuing. You can either create a file and wait for it to be deleted by the HTA (you'll probably want a TIMEOUT value on the loop), or use the TASKLIST command (maybe in a batch file...TASKLIST > activetasks.txt) and check to see if the hta is active.
----------------------
I'll update this code as I have time, but meanwhile I hope it gives you a starting point.
BTW, the second file, posterconfig.zip contains a user interface configuration dialog. Not very refined, but it works.
[attachment deleted by admin]
Some data about the activex component used is here:
http://www.the-art-of-web.com/javascript/ajax/
At the moment, what is does:
- Psf file invokes the HTA (HyperTExt Application)
- HTA uses GET to load the source code for the impawards.com index page into a textarea
- HTA can save the textarea to a file
- the activex component is 'standard' on windows xp and up...no install required
Known issues:
ActiveXObject('msxml2.xmlhttp') works for VISTA, other objects are used by other O/S's. The loadXMLDoc(url, params) subroutine shows how to connect to the correct object.
POST isn't supported by this code...at the moment...but it looks simple enough...in fact it could be possible to write a generic "read the <input> tags" routine to build most of the post variables on-the-fly.
Very unlikely this code will work on anything but a "genuine windows" install.
The FileExecute routine will NOT wait for the executable to finish before continuing. You can either create a file and wait for it to be deleted by the HTA (you'll probably want a TIMEOUT value on the loop), or use the TASKLIST command (maybe in a batch file...TASKLIST > activetasks.txt) and check to see if the hta is active.
----------------------
I'll update this code as I have time, but meanwhile I hope it gives you a starting point.
BTW, the second file, posterconfig.zip contains a user interface configuration dialog. Not very refined, but it works.
[attachment deleted by admin]