Re: problem with use of timeout property of Finder in applescript
Re: problem with use of timeout property of Finder in applescript
- Subject: Re: problem with use of timeout property of Finder in applescript
- From: "Amit Jain" <email@hidden>
- Date: Tue, 1 Aug 2006 21:21:03 +0530
Thanks Matt for taking interest on my query...
But I am unable to access the page which u have reffered.
Can u please give me a solution for stopping finder to search for IPAddress
after a particular time???
On 8/1/06, Matt Neuburg <email@hidden> wrote:
On Tue, 1 Aug 2006 18:09:14 +0530, "Amit Jain" <email@hidden>
said:
>Hi all,
>I have used the following code and used the time out property of
>finder in applescript:
>with timeout of 10 seconds
> try
> tell application "Finder"
> mount volume "smb://username:password@ipAddress/sharedFolderName"
> end tell
> on error
> display dialog "could not connect to server"
> end try
>
>end timeout
>
>it works successfully and if in 10 secs does not find any server with
>above ipAddress it displays the above dialogue.
>But the Finder still searches for the ipAddress and after some a long
>duration(in minutes) it gives an error on console"mount_smbfs:
>negotiate phase failed: syserr = Operation timed out".
>Then I am not able to understand that what is the use of above
>applescript if still the Finder continues its process in background?
That *is* the use of above applescript. The "with timeout" means that your
script stops waiting after 10 seconds; it does not, and should not, also
tell the Finder to stop working. See pp. 295-6 of my book, and please take
questions of this sort elsewhere (e.g. the AppleScript-Users list). m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden