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

Re: Help with Script to mount SMB


  • Subject: Re: Help with Script to mount SMB
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 16 Oct 2015 23:26:20 +1100

On 16 Oct 2015, at 11:19 PM, Ball, Dan <email@hidden> wrote:

Here is what I changed it too:

You don't need all those 'tell app "Finder"' blocks -- nesting them is pointless. And the "mount volume" command should *not* be inside a Finder tell block -- it has nothing to do with the Finder. Try something like this:

set diskName to "share"
set itExists to false
tell application "Finder"
if disk diskName exists then
display dialog "I cannot locate your U: Drive or you already have it mounted!" buttons {"Cancel"} default button "Cancel" with icon caution giving up after 10
set itExists to true
end if
end tell
if not itExists then
try
mount volume "smb://server.yourdomain.com/share"
end try
end if

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

References: 
 >Re: Help with Script to mount SMB (From: "Ball, Dan" <email@hidden>)

  • Prev by Date: Re: Help with Script to mount SMB
  • Next by Date: Re: Help with Script to mount SMB
  • Previous by thread: Re: Help with Script to mount SMB
  • Next by thread: Re: Help with Script to mount SMB
  • Index(es):
    • Date
    • Thread