automatically connect to network share when osx loads

You can make an applescript to do this. There is a post on this board somehwere about how to do it, but its easly. Open up your apple script editor. then put the following

PHP:
mount volume "smb://yourIP/ShareName as user name "userName" with password "yourpass"

Then save this script as an application and put it in your start up items. That is the only way that i know how to do it.

I did notice that if you keep a network drive in the dock, when you restart if you click on the Network Drive in the dock then it will automatically connect.

Good luck
 
I am very new at mac OSX so where is applescript editor for me to do this and where is the startup items located.

Thanks a lot for the help.


Heath Pitts
 
applescript editor is in your applications folder
You can save the script somewhere to your hard drive and then, in system prefs, place your script in the "login items"
 
an even easier way to do this vs. writing an applescript is the following (i copied this hint from www.macosxhints.com):
"I just realized, that if you manually mount a server (cmd-K) and then drag the mounted server icon to your Login items window (in System Preferences), your system will automount them at startup (login). No password/login screen; it's just done."
i presonally have't tried it yet but .. you might want to give it a whurl and see if it works ...
 
Got it working the way I wanted by creating an applescript. Wow my first time to write an AppleScript!...and it worked!



Heath Pitts
 
congrats .. now if you could post that applescript so that the rest of us could benefit .. that'd be great :)
 
this is what i've been using

PHP:
--error 5062 unable to connect to server
--have to find a way to ignore this error
--<protocol>://<name>:<password>@<IP or server name>/<volume name>
--some examples
--open location "afp://bbobby:346400@225.174.41.163/Jobs77"

tell application "Finder"
	try
		open location "afp://rjohnson:445534@135.217.14.55/JOBS"
	end try
	
	try
		open location "afp://rjohnson:445534@135.217.14.56/PROOFS"
	end try
end tell
 
tell application "Finder"
activate
mount volume ("smb://user:password@ip/volume")
end tell


Got this from:

http://www.macosxhints.com/comment....yes+applescript&type=article&order=&pid=11378

But it worked great for my uses all i did change was the afp to smb and put in my username and password, save it as a program in applescript to doucments directory, and drag it to login items. Works great everytime. I needed it because iTunes is set to look at my mp3s share on my linux server and if that directory is not available when you start iTunes, it defaults back to the original directory.
 
Back
Top