• 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
Re: timeout block question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >timeout block question (From: Jim Brandt <email@hidden>)

  • Prev by Date: timeout block question
  • Next by Date: Re: Scripting the Colors palette
  • Previous by thread: timeout block question
  • Next by thread: Re: timeout block question
  • Index(es):
    • Date
    • Thread