AppleScript to mount Samba servers
Pilex For Sale
Cordarone No Prescription
Buy Adalat No Prescription
Buy Lamictal Online
Buy Online Clarina
Glucophage For Sale
Sinequan No Prescription
Buy Levitra No Prescription
Buy Online Tramadol
Lioresal For Sale
Buy Zetia Online
Buy Acomplia No Prescription
Prandin No Prescription
Buy Online Viagra
Avodart For Sale
Buy Superman Online
Buy Loprox No Prescription
High Love No Prescription
Buy Online Deltasone
Buy Isordil Online
Emsam No Prescription
Zestril For Sale
Buy Requip No Prescription
Buy Online Sleepwell
Buy Myambutol Online
Our office is mainly a Windows shop, both employee computers and file servers. But being one of the few people who use a mac it’s always a pain to mount the necessary networked drives on a daily basis. So I took some time the other day to write an AppleScript that runs on login to mount all the network drives I need to use throughout the day. It also checks my IP address to see if I am in the office or connected through VPN before trying to mount the drives.
Here is the script. I have masked out the ip addresses but you should be able to get the idea to set this up to use it for your needs.
set TheAddress to (do shell script "curl -f http://checkip.dyndns.org | awk '{print substr($6,1,13)}'") if TheAddress is equal to "xxx.xxx.xx.xx" then --display dialog "Your OFFICE IP is : " default answer (TheAddress) mount_drives() else if TheAddress is equal to "xxx.xxx.xx.xx" then --display dialog "Your VPN IP is : " default answer (TheAddress) mount_drives() else display dialog "You aren't at work" end if on mount_drives() mount volume "smb://xx.x.x.x/projects" mount volume "smb://x.x.x.x/dev" end mount_drives
To set this to run on login go to System Preferences>Accounts>and Login Items under your account. From there you can add the script to the list.
Continue reading » · Written on: 04-22-09 · No Comments »


Leave a Reply