Re: timeout block question (Axel Luttgens)
Re: timeout block question (Axel Luttgens)
- Subject: Re: timeout block question (Axel Luttgens)
- From: Axel Luttgens <email@hidden>
- Date: Thu, 19 Mar 2009 14:29:13 +0100
Le 19 mars 09 à 01:06, Jim Brandt a écrit :
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.
Hello Jim,
A quick and dirty idea...
Could you save your script "myscript.scpt" as an application, say
"myscript.app"?
If yes, this should provide you with the needed control over the time
spent to wait for a reply from "myscript" in the calling script:
with timeout of 180 seconds
tell application "myscript" to run
end timeout
Of course, in case of timeout, you would then have to check not only
for the existence of the pdf file, but to ensure to (cleanly) kill
myscript as well, before looping again.
HTH,
Axel
_______________________________________________
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