Here is the script. I have placed "//crashes here" in the two locations that the script crashes with the noted error for me. I can place the line "libFunc>hIE,WaitNewIE,IE[2],0" anywhere in my code to cause macro scheduler to crash (after hitting the stop button the client will abnormally exit, but will not provide the OLEexception error gump)
Code: Select all
Let>RFS_Variable=98997
Let>username=
Let>password=
// Generated by MacroScript WebRecorder 1.70
// Recorded on Tuesday, July 11, 2006, at 03:49 AM
LibLoad>IEAuto.dll,hIE
If>hIE=0
MessageModal>Could not load IEAuto.dll, make sure it is in the path or edit the LibLoad line.
Goto>end_script
EndIf
//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=1
LibFunc>hIE,CreateIE,IE[0],0
//LibFunc>hIE,ShowIE,r,%IE[0]%,0
LibFunc>hIE,Navigate,r,%IE[0]%,https://isftools.ahf.nmci.navy.mil/
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
Let>FrameName={""}
Let>FormName={"login"}
Let>FieldName={"user"}
Let>FieldValue={"%username%"}
LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0
Let>FrameName={""}
Let>FormName={"login"}
Let>FieldName={"password"}
Let>FieldValue={"%password%"}
LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0
Let>FrameName={""}
Let>FormName={"login"}
Let>TagValue={"loginSubmit"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
Let>FrameName={""}
Let>FormName={"pickRole"}
Let>FieldName={"role"}
Let>FieldValue={"SSE-Base Ops"}
LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0
Let>FrameName={""}
Let>FormName={"pickRole"}
Let>TagValue={""}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
Let>FrameName={""}
Let>FormName={"pickRole"}
Let>TagValue={"APPLICATION DATA"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
Let>FrameName={""}
Let>FormName={"pickRole"}
Let>TagValue={"Application Catalog"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
Let>FrameName={""}
Let>FormName={"searchForm"}
Let>FieldName={"rfsId"}
Let>FieldValue={"%RFS_Variable%"}
LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0
Let>FrameName={""}
Let>FormName={"searchForm"}
Let>TagValue={"viewList"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
Let>A18_SIZE=4098
LibFunc>hIE,ExtractTag,r,%IE[0]%,,A,18,0,A18
MidStr>r_6,1,r,A18
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:%A18%
libFunc>hIE,WaitNewIE,IE[1],0
//sometimes crashes here
libFunc>hIE,WaitIE,r,IE[1]
wait>delay
WaitWindowOpen>Application Usage*
wait>delay
WaitReady>Application Usage*
wait>delay
Let>TD_VALUE=14
Label>FindUICLoop
Let>RFS_String=%RFS_Variable% %CRLF%RFS Notes
Let>TD_VALUE=TD_VALUE+1
if>TD_VALUE=15
//check to make sure UIC is found in this table
Let>CELL_SIZE=4098
LibFunc>hIE,ExtractTag,r,%IE[1]%,,TD,TD_VALUE,0,UIC_CELL
MidStr>r_6,1,r,UIC_CELL
//messagemodal>%UIC_CELL%
if>%UIC_CELL%<>UIC
messagemodal>UIC cell not in proper location, script aborting
goto>abort
endif
endif
//Modify buffer size if required ...
Let>CELL_SIZE=4098
LibFunc>hIE,ExtractTag,r,%IE[1]%,,TD,TD_VALUE,0,RFS_CELL
MidStr>r_6,1,r,RFS_CELL
// messagemodal>%TD_VALUE% is TD_Value - rfscell set to %RFS_CELL%
If>%RFS_CELL%=%RFS_String%,FoundFirstUIC
Goto>FindUICLoop
Label>FoundFirstUIC
//subtract 5 spaces from RFS location
let>Site_UIC=TD_VALUE-5
Let>CELL_SIZE=4098
LibFunc>hIE,ExtractTag,r,%IE[1]%,,TD,Site_UIC,0,Site_UIC_INFO
MidStr>r_6,1,r,Site_UIC_INFO
//messagemodal>the Site_UIC variable is %Site_UIC% the text is %SITE_UIC_INFO%
wait>delay
LibFunc>hIE,KillIE,r,%IE[1]%
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
Let>FrameName={""}
Let>FormName={"pickRole"}
Let>TagValue={"REPORTS"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
Let>FrameName={""}
//Let>FormName={"pickRole"}
Let>FormName={"searchForm"}
Let>TagValue={"Application Deployment Solution "}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
Let>FrameName={""}
Let>FormName={"searchForm"}
Let>TagValue={"Search for Command"}
LibFunc>hIE,ClickTag,r,0,str:FrameName,str:FormName,A,TEXT,str:TagValue
//libFunc>hIE,WaitNewIE,IE[2],0
//crashes here -- on above line when uncommented
//script not functional fro mthis point on
//libFunc>hIE,WaitIE,r,IE[2]
//LibFunc>hIE,WaitIE,r,%IE[2]%
//wait>delay
WaitWindowOpen>Command Search*
wait>delay
WaitReady>Command Search*
wait>delay
SetFocus>Command Search*
Let>FrameName={""}
Let>FormName={"search"}
Let>FieldName={"uic"}
Let>FieldValue={"%Site_UIC_INFO%"}
LibFunc>hIE,FormFill,r,%IE[2]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0
//LibFunc>hIE,FormFill,r,%IE[2]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0
//LibFunc>hIE,WaitIE,r,%IE[2]%
//Wait>delay
Let>FrameName={""}
Let>FormName={"search"}
Let>TagValue={"submit"}
LibFunc>hIE,ClickTag,r,%IE[2]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue
//LibFunc>hIE,WaitIE,r,%IE[2]%
//Wait>delay
//messagemodal>done
Label>abort
//exited with error
WriteLn>c:\DAAreportscript.log,result,DAAaborted for %RFS_Variable%