Q: Auto Mount Time Capsule
As I scoured the internet to find an method of auto mounting my Time Capsule's drive upon startup, without dragging the drive to the Startup Items (which results in a window being opened every time one logs in), and without using something like Automator. I discovered seemingly obscure technique using pure AppleScript. So I wanted to share that method, in hope that it might benefit someone in the future.
This method covers pure AppleScript.
- Open the Apple Script Editor.
- Create a new document.
- Paste the following line into that new document (as one line):
tell application "Finder" to mount volume "afp://AirPort._afpovertcp._tcp.local/Data" - Mount your Time Capsule drive if it is not already.
- Right-click on your mounted drive, and "Get Info".
- Copy the server address from the info window.
- Paste that server address into the Apple Script, replacing the existing URL that was pasted in step 3.
- In the menu bar go to: File > Export
- Choose "Application" as the file format to export to (do not select any items under the file format).
- Enter a name for the application you are creating, and save it to the location you desire.
- Drag the resulting application into your startup items, and you're done.
If you do not know of an appropriate place to put your created application, I recommend using an "Applications" folder within your home directory.
If you do not know how to add an application to your startup items, go to: System Preferences > Users & Groups. Choose your username, and then click the login items tab. You can drag your script to that section (after having added your Application to your chosen folder), or you can click the "+" sign below that section to navigate and find it on your drive.
I hope this helps.
Sincerely,
- Prasand J.
Airport Time Capsule 802.11ac, OS X Mavericks (10.9.2)
Posted on Apr 9, 2014 5:31 PM