• 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
Help with Script to mount SMB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with Script to mount SMB


  • Subject: Help with Script to mount SMB
  • From: "Ball, Dan" <email@hidden>
  • Date: Wed, 14 Oct 2015 01:47:37 +0000
  • Thread-topic: Help with Script to mount SMB

Hi all,

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



What I want the script to do is try and mount the share smb://server.apple.com/share and have it mount.   If for some reason they try to mount it again which would be before throw an error and give a message to the user I cannot locate FacShare or you already have it mounted!


I copied the code out and into Script Editor to play with it and its still not working.


What am I missing?


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


  • Follow-Ups:
    • Re: Help with Script to mount SMB
      • From: Alex Zavatone <email@hidden>
  • Prev by Date: Re: Shell script to get a list of all subfolders inside a folder
  • Next by Date: Re: Help with Script to mount SMB
  • Previous by thread: Re: Find out in which subfolder a given file resides
  • Next by thread: Re: Help with Script to mount SMB
  • Index(es):
    • Date
    • Thread