Re: Help with Script to mount SMB
Re: Help with Script to mount SMB
- Subject: Re: Help with Script to mount SMB
- From: "Ball, Dan" <email@hidden>
- Date: Wed, 14 Oct 2015 19:40:01 +0000
- Thread-topic: Help with Script to mount SMB
On 10/14/15, 8:47 AM, "applescript-users-bounces+ball.dan=email@hidden on behalf of email@hidden" <applescript-users-bounces+ball.dan=email@hidden on behalf of email@hidden> wrote:
>Message: 8
>Date: Wed, 14 Oct 2015 08:09:53 -0400
>From: Jim Weisbin <email@hidden>
>To: email@hidden
>Subject: Re: Help with Script to mount SMB
>Message-ID: <email@hidden>
>Content-Type: text/plain; charset="utf-8"
>
>"Ball, Dan" <email@hidden> wrote:
>
>>Hoping someone can help with this script? I have a small xcode app I made years ago that gives users a GUI to mount shares off of our servers. I opened it up here just to make some small changes and I’m noticing the on error part not working anymore. I know this used to work, but not sure when it stopped.
>>Script:
>>tell application "Finder"
>>try
>>mount volume "smb://server.apple.com/share"
>>on error
>>tell application "Finder"
>>activate
>>display dialog "I cannot locate share or you already have it mounted!" buttons {"Cancel"} default button "Cancel" with icon caution giving up after 10
>>end tell
>>end try
>>end tell
>
>
>I understand that you would want it to throw an error if it can’t connect (which I assume it does).
>
>What I don’t understand is why you care if it’s already mounted. If it’s already mounted, your code won’t error and as far as I can see no bad consequences - the system won’t mount it “twice”.
>
>Jim Weisbin | C.T.O. | human
Cause we are talking about end users here…lol I have had instances in the past where the drive mounted and showed under the app window and they kept clicking and clicking and then called because it never mounted. I went up and moved the window and there it was. Why it mounted in the middle of the screen I’m not sure, they must have moved the icon to that location at some point. Just trying to stop stupidity…lol It would error before, not sure why it stopped.
Thanks,
Dan
_______________________________________________
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