Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Applications > Mac Applications and Mac App Store

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 5, 2012, 06:26 AM   #1
Theydonboi
macrumors newbie
 
Join Date: Jun 2011
Help with an Applescript

Hey all,

I have an apple script that runs on my MacBook that, on login, automatically mounts a connection to the iTunes share on my Synology NAS :

mount volume "smb://diskstation/Music/"

This works great...except when I'm not at home and the MacBook can't reach the NAS. This means that the applescript just hangs on my dock at error. This occasionally cause issues on shutdown as there's still, technically, an application running.

I tried entering a timeout:

with timeout of 60 seconds
mount volume "smb://diskstation/Music/"
end timeout
quit

Unfortunately, this changes nothing. The applescript gets stuck as it shows an error which must be cleared manually:

"an error of type -36 has occurred
Edit / OK"

Is there a way to bypass this error message and simply quit the script if it can't run?

Any ideas?
Theydonboi is offline   0 Reply With Quote
Old Nov 5, 2012, 07:45 AM   #2
see.solve.
macrumors newbie
 
Join Date: Oct 2012
This might work.

Code:
try
	mount volume "smb://diskstation/Music/"
on error
	error number -128
end try
see.solve. is offline   0 Reply With Quote
Old Nov 5, 2012, 11:52 AM   #3
Weaselboy
macrumors G5
 
Weaselboy's Avatar
 
Join Date: Jan 2005
You might try the free app Control Plane. You can set it to recognize your home network login and auto mount the NAS only then. Nice app.
Weaselboy is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Applications > Mac Applications and Mac App Store

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Why so much Applescript? Dranix Mac Programming 25 May 2, 2014 01:05 AM
help with applescript andrewisgod Mac Programming 0 Apr 18, 2014 07:58 AM
AppleScript Help McStudenTiK OS X 0 Feb 5, 2014 12:58 AM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Programming 0 Oct 28, 2013 11:38 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Applications and Mac App Store 0 Oct 28, 2013 11:32 PM

Forum Jump

All times are GMT -5. The time now is 05:27 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC