• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Reading data from new IE window; slowdown
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading data from new IE window; slowdown


  • Subject: Reading data from new IE window; slowdown
  • From: Wim Melis <email@hidden>
  • Date: Wed, 17 Jan 2001 13:51:47 +0100

Hi all,

The script below opens a new window in Explorer, waits till the html is
loaded, reads the html and closes the window again.

It works like a charm, but I'm wondering why it slows down everything.
This code is part of a larger script, and the entire script executes very
slowly. But if I remove the isReady() part and load the URL manually in
Explorer before reading its data, the full scripts just zips along. For
instance, the last part of the script loads data taken from the URL into
a FileMaker database. Without isReady() the script executes fast, you can
see the data popping into FileMaker almost immediately. With the
isReady() part, you can see the fields in FM being filled one at a time,
with a obvious delay between each field.

Questions:

1) Obviously: is there a way to get rid of that sluggishness?

2) I used Akua Sweets for pausing. Is there a way to pause and release
processor time, without having to use an osax?

3) Probably not, but still: could this be done with Navigator too? (I
haven't been able to find a command that retrieves html from it.)

Thanks, Wim


tell application "Internet Explorer 4.5"
-- open a window with theURL
OpenURL theURL toWindow 0
-- get the data from it
set theContent to isReady(theURL) of me
-- and close the window
CloseWindow -1
end tell

on isReady(theURL)
(* Recursive routine, to avoid using a
repeat loop. Checks if the data is
loaded into the Explorer window,
and returns it after that. *)
tell application "Internet Explorer 4.5"
-- activate is necessary, don't know why
Activate
-- wait till *some* data is available
try
set a to GetSource
on error
pause for 20 -- from akua sweets osax
set a to isReady(theURL) of me
end try
-- wait till data up to the </pre> bit) is in
if a does not contain "</pre>" then
pause for 20
set a to isReady(theURL) of me
end if
end tell
return a
end isReady


-----
email (home): email@hidden
email (office): email@hidden
http://www.noorderlicht.com * Noorderlicht photofestival


  • Prev by Date: RE: Mounting Volumes
  • Next by Date: Re: SoundJam: "busy" detection
  • Previous by thread: Re: Xpress 4.1 and group box type
  • Next by thread: fetch directory listing
  • Index(es):
    • Date
    • Thread