Re: timeout block question (Axel Luttgens) (Jim Brandt)
Re: timeout block question (Axel Luttgens) (Jim Brandt)
- Subject: Re: timeout block question (Axel Luttgens) (Jim Brandt)
- From: Thomas Maffucci <email@hidden>
- Date: Thu, 19 Mar 2009 19:42:22 -0400
- Thread-topic: timeout block question (Axel Luttgens) (Jim Brandt)
> Axel,
>
> I'll give you a summary: it's a complex script.
> Most of the commands are entered via GUI scripting.
>
> 1) I'm trying to log into Fidelity's page. It's a secure location.
> 2) after logging in, I select my portfolio page
> 3) after navigating to that page, I switch page settings to
> landscape mode
> 4) I then select a format for print option, which opens a new window.
> 5) in the print dialog, I select "Preview" and wait for Preview.app
> to open the page
> 6) I select the save option, entering a page name with the date as
> part of the name
> 7) after the save, I quit Preview and log out of Fidelity's page.
>
> Because this script has hung so many times, I log key spots in a log
> file.
> Most of the time it has hung during the opening of the page that is
> formatted
> for print. I have added extra delays at this point. It still hangs
> about once a week.
Jim,
I do a very similar process but I don't use GUI scripting. I use
Extra Suites to navigate the web site and screen scrap to get the info I
need.
I have found the only reliable technique
is to enter a display dialog manual wait such
as:
try
set mess to "Wait for Page to load"
set WTG to button returned of (display dialog mess buttons
{"Page BAD", "Page Good"} default button 2)
if WTG = "Page 1 Good" then
-- continue
else
--May be go back and try again
end if
end try
This way you control the wait that is necessary to get the correct info.
Tom Maffucci
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden