mburr Posted March 26, 2010 Posted March 26, 2010 I am working on a program that is collecting user information and creating an html file from these files and then launching these in an unattended IE session using the _IECreate command in AutoIT. The response from this is an automatically generated xml file which is then displayed back on the browser. I am trying to figure out a manner in which I can get the contents of that xml file from the browser so I can parse it for additional information for a secondary response, but the file is not locally cached on the machine or the server and is a generic URL that cannot be loaded by simply entering the URL. I have tried the Run command and used the $STDIN_CHILD option, as well as the ConsoleRead and ConsoleWrite in hopes of capturing the xml creation, but that did not appear to work as I would only get back the result of 0 or 1. I am wondering if anyone else has run into this situation and if they had any solutions? I am also working with the developer for the other program to see if they had any suggestions as well.
BrettF Posted March 26, 2010 Posted March 26, 2010 Welcome to the forums mburr. First off code is a great addition to a pretty good first post. This lets us see what you are doing. If you can't post the full code due to it being 1000 lines long (no one will look at it) or because it contains sensitive information; post a script that can replicate the problem. If you're using IE and you can get the XML output using that then all you really have to do is get XML into your script for further parsing is use the following function: _IEDocReadHTML ( ByRef $o_object ) If you still run into troubles post some code we can work with and we'll try give you a hand. Also why I think of it, make sure you get the full version of SciTE4AutoIt3. This version has more features than the one included with AutoIt and makes for a much more pleasurable developing experience. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
mburr Posted March 29, 2010 Author Posted March 29, 2010 Thanks for the response. I looked at the information that you sent and I tried to incorporate the files, but that did not seem to do the trick. I am getting a result, but it is a "0" only. The code is as follows: $Request=_IECreate($request_file,0,0,0) $oIE = ("https://resultantxml_file") $sHTML = _IEDocReadHTML ($oIE) FileWrite("\\server\E$\Requests\id.txt",$sHTML) I may just be missing something here. Thanks, Matt
BrettF Posted March 30, 2010 Posted March 30, 2010 Normally in IE does it ask you for a password? If so check the remarks for InetGet and the like. There is no way that code will work :S Try making something that works on your local machine then move to writing the file on the remote computer. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now