• 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: Don't understand timeout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Don't understand timeout


  • Subject: Re: Don't understand timeout
  • From: Robert Poland <email@hidden>
  • Date: Thu, 18 Aug 2011 12:14:27 -0600

Alex,

Maybe I'm not following you.

The problem I'm having is that the action does not stop after 2 seconds.


On Aug 18, 2011, at 11:52 AM, Alex Zavatone wrote:

try
  with timeout of 2 seconds
   tell application "Finder"
    mount volume myServer -- with username "graphics" with password ""
    -- mount volume "Assets" on server "afp://mercury-server.ebiz.verizon.com/" as user name "graphics" with password ""
    -- mount volume "Assets" on server "afp://mercury-server.ebiz.verizon.com/" as user name "graphics" with password "graphics"
   end tell
  end timeout
on error
  log "mount error"
end try
On Error is what you are looking for.
- Zav
No matter how much you wish it were true, tequila is not in its own food group.
On Aug 18, 2011, at 10:32 AM, Robert Poland <email@hidden> wrote:

Hi,

This is in Snow Leopard.

Script below, I'm expecting the timeout to stop the action, after 2 seconds, and throw the error "Timeout exceeded" and continue on with the on error.

try
with timeout of 2 seconds
my doGUIScriptingCommands() -- Select all in window
tell application "Finder" to set itemsInWindow to selection
end timeout
error "Timeout exceeded"
on error
beep 3
set itemsInWindow to 65
end try


Robert Poland - Fort Collins, CO

Robert Poland - Fort Collins, CO



 _______________________________________________
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

  • Follow-Ups:
    • Re: Don't understand timeout
      • From: Axel Luttgens <email@hidden>
    • Re: Don't understand timeout
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: Don't understand timeout
  • Next by Date: Re: Still don't understand timeout
  • Previous by thread: Re: Don't understand timeout
  • Next by thread: Re: Don't understand timeout
  • Index(es):
    • Date
    • Thread