I discovered a bug with writing data to a ReportFile that my Script extracts data from a Web Site using the IE_EXTRACT Tag. The following Script runs Fine through MS, but when I use MS to Create an EXE and Run it, then the Data written to the Log File is incorrect. I'm going to Post the Full Code and Log Files here for complete Explanation.
I am using v10.1.16 of MS and v2.04/2.02 of WebRecorder to Create the following Script.
Code: Select all
// Generated by MacroScript WebRecorder 2.04
// Recorded on Tuesday, July 1, 2008, at 07:00 PM
//Load IEAuto.DLL Library
LibLoad>%Sys_Dir%\IEAuto.DLL,hie
//Load VBScript
VBSTart
VBEND
//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=1
Let>comma=,
Let>ReportFile=%CWD%\Output.TXT
//Delete Log File if Exists
IfFileExists>%ReportFile%
DeleteFile>%ReportFile%
ENDIF
//Record TimeStamp in Report File
TimeStamp>%ReportFile%,Macro Started
//Launch IE
IE_Create>0,IE[0]
IE_Show>IE[0],1,r
IE_Navigate>%IE[0]%,http://www.mjtnet.com/usergroup/?c=2,r
IE_Wait>%IE[0]%,r
Wait>delay
Let>X=1
//Start Loop
Label>Start
### Extract Tag for Technical / Scripting Forum ###
//Modify buffer size if required ...
Let>A70_SIZE=4098
IE_ExtractTag>%IE[0]%,,A,70,0,A70,r
//Trim Data to be Written to File
VBEVAL>Trim("%A70%"),strReportValue
Let>strData=%X%
ConCat>strData,Comma
ConCat>strData,%strReportValue%
ConCat>strData,Comma
ConCat>strData,%A70%
TimeStamp>%ReportFile%,%strData%
Let>X=X+1
IF>X<5>%IE[0]%,r
//Close Log File
TimeStamp>%ReportFile%,Macro Finished
//Release Library
LibFree>hIE
Label>end_script
Code: Select all
19:40:21:578 - Macro Started
19:40:34:000 - 1,Technical / Scripting,Technical / Scripting
19:40:34:015 - 2,Technical / Scripting,Technical / Scripting
19:40:34:015 - 3,Technical / Scripting,Technical / Scripting
19:40:34:031 - 4,Technical / Scripting,Technical / Scripting
19:40:34:062 - Macro Finished
Code: Select all
19:44:22:531 - Macro Started
19:44:23:562 - 1,%A70%,%A70%
19:44:23:562 - 2,%A70%,%A70%
19:44:23:562 - 3,%A70%,%A70%
19:44:23:562 - 4,%A70%,%A70%
19:44:23:562 - Macro Finished
When Running the Script in Debug Mode, Both strReportValue and A70 are set to "Technical / Scripting", so as you can see from the above comparisons, it's NOT the VBEVAL Statement.
I sincerely, hope that Marcus can isolate this problem and fix it ASAP with a maintenance release as it puts my whole program to a stand still if I can't compile it
Thank You!
Update to this Original Post..
while reading through the forum, I came across the following Post:
http://www.mjtnet.com/forum/viewtopic.php?t=4432
And wonder if I could get some explanation here on how to include the IEAuto.DLL with the Compiled EXE. I'm thinking that I'm not doing something right with this and maybe (but doubtful) that has something to do with this problem. Could someone please point me to the correct location to find information on creating a compiled EXE for distribution to another computer that won't have MS already installed on it? (Would I be violating any License issues with my Compiled EXE if it includes IEAuto.DLL?) Thank You.