I've been using IE8 with OOREXXv126.96.36.19941 for some time now, but have hit a
wall with a current app where I want to keep a background task running through
the day, checking back to a website periodically for changed information ie.
keep a loop going where each pass of the loop fires up IE to do the work. The
issue is that the first pass works perfectly but no matter what I do I can't
stop the app hanging on subsequent passes. It seems to navigate to the site
but then lose track of the object and not recognise that the document has
An working example of the problem is...
say 'check started ' .DateTime~new
myIE = .controlledIE~new("InternetExplorer.Application","WITHEVENTS")
myIE~visible = .true
doc = myIE~document
say 'check completed ' .DateTime~new
::CLASS controlledIE SUBCLASS OLEObject
say 'method init'
self~block = .true
::METHOD block ATTRIBUTE
say 'method navigate'
say 'method nav2'
say 'method wait'
do until self~block == .false
call SysSleep 1
say 'doc compl' self~LocationURL
self~block = .false
Output from this run is ...
check started 2011-07-27T14:57:55.855000
doc compl http://www.ibm.com/us/en/
check completed 2011-07-27T14:58:00.230000
check started 2011-07-27T14:58:00.230000
check completed 2011-07-27T14:58:05.105000
check started 2011-07-27T14:58:05.105000
*** At this point the app is hung. Tried the following
- URL used makes no difference.
- Intranet or internet makes no difference.
- Omitting the 'navigate' method makes no difference.
I can run this code again and again and on occasion it will work fine. But
more often than not it will hang on the 2nd or 3rd pass. I've noted other
discussions where people have discussed the 'quit' methods not processing
correctly, but they were old discussions which I think would be resolved now.
Any assistance greatly appreciated.
sorry, the link is
without the semi-colon. Don't know how I managed to get a typo in there :)
A couple of test results perhaps worth noting ...
Memory, processor etc. all stay happily under control with no steady growth as
the loop count increases. And I get 1 "iexplore.exe" process for the whole
run. This is an acceptable workaround, it just means that I have a background
"iexplore.exe" process running all day.
I can't help with the specific problem, but I have to say I think that
starting IE just to fetch a web-page is a massive overhead.
I would have thought that you'd be better off calling either "cURL" or "wget"
- both of which are command-line tools for fetching resources from specified
URLs. They typically also allow you to fetch the headers which describe the
page (which might allow you to see if the page has changed since the last
fetch) and allow you to pass data (eg cookie contents) on your request.
Depending of the type of data you want you can develop a simple http client
class using rxsock. The protocol itself isn't so dificult to manage.
thanks for the responses,
I'll happily continue the trek and hunt down cURL, wget and rxsock and give
them a go. Very much enjoying the exposure to new knowledge that oorexx is
providing. Here was I thinking there was only a hundred ways to skin a cat.
The website in question is an intranet front end to a problem-tracking db. It
seems picky about IE, don't know why. eg. it fails to load in Firefox. It may
work with other tools, I'll certainly make use of them enough to learn them
anyway, but for the moment I'll stick with the IE approach coz I've found a
workaround and need to move onto other things before the boss gets too
However I think it's still worth one of the developers seeing if they can
track down whether this is a bug. Having a growing list of iexplore.exe
instances after executing 'quit' seems incorrect.
Log in to post a comment.