Re: timeout block question
Re: timeout block question
- Subject: Re: timeout block question
- From: Axel Luttgens <email@hidden>
- Date: Wed, 18 Mar 2009 18:10:38 +0100
Le 18 mars 09 à 17:17, Jim Brandt a écrit :
I have a question about timeout blocks.
I currently have a script that logs into a web page (a secure page),
makes some selections from that page to navigate to a different
page within this site and prints this page to a pdf file. This
requires some
GUI scripting as the page is not static. Even with delays and
attempts to
verify that the pages are completely loaded before moving to the next
page, this script sometimes hangs. This usually happens when the site
doesn't respond in a timely enough manner.
[...]
This way, I can test for the existence of the pdf file, and if it
wasn't created,
cycle through the process again until it completes. But to do that,
I need the
timeout block to fail after a certain amount of time, indicating
that the
called script "hung".
[...]
Am I missing something here? Can a timeout block be used in this
manner,
and if so, what do I need to change?
Hello Jim,
The "with timeout" relates to the time needed for a reply to come back
from an application (say, the Finder) invoked from a "tell
application..." statement; it doesn't apply to AppleScript statements.
Here, it seems you are staying in AppleScript.
Perhaps would it be possible to handle the timeout in myscript.scpt?
Could you tell us a bit more about that script?
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