• 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 Function acting weird!!!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Timeout Function acting weird!!!


  • Subject: Re: Timeout Function acting weird!!!
  • From: "Arthur J Knapp" <email@hidden>
  • Date: Wed, 21 Mar 2001 13:43:46 -0500

> Date: Wed, 21 Mar 2001 09:36:50 +1100
> Subject: Timeout Function acting weird!!!
> From: William Jamieson <email@hidden>

> I am attempting to use the AppleScript timeout command for a variety of
> applications. Yet I find that I am getting inconsistent results.

> try
> with timeout of 8 seconds

The timeout block is for use with applications. It specifies the
amount of time that your script will wait for the result of an
AppleEvent sent to an application. In your example above, there is
no application involved.

> However I hold the an application open with a dialog I can generate a
> timeout error (-1712) (try using the code below).

> try
> with timeout of 8 seconds
> tell application "Finder"
> activate
> display dialog "Holding Finder Open" giving up after 10

So AppleScript is giving the Finder 8 seconds to activate. Then
it is giving the Finder 8 seconds to return the result of the display
dialog command.


> set x to 0
> try
> with timeout of 1 seconds
> repeat 2000000
> set x to x + 1

Again, there is no application involved.

<http://developer.apple.com/techpubs/macos8/InterproCom/AppleScriptScripters
/AppleScriptLangGuide/index.html>



Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden

Hey, check out:
http://www.AppleScriptSourceBook.com


  • Prev by Date: Re: sending form data with IE 5
  • Next by Date: How to access the comment information for files.
  • Previous by thread: Timeout Function acting weird!!!
  • Next by thread: Scripting graphics manipulations, improving speed over GraphicConverter 4
  • Index(es):
    • Date
    • Thread