Auto mount network drives with delay AppleScript

Hi folks.


I'm a newbie to AppleScript.. but I'm currently using an AppleScript application to auto mount a number of network volumes from my NAS when I login to my macbook. (found this solution here: https://discussions.apple.com/thread/3205868?answerId=15795774022#15795774022 )



The script i'm using is as follows.



-- Automatically mount network drives

try
          mount volume "afp://192.168.1.100/video" as user name "admin" with password "*************"
end try
try
          mount volume "afp://192.168.1.100/photo" as user name "admin" with password "*************"
end try


I've saved this as an application and added it to my Login items list.


However, the application tries to run before my wifi network has kicked in so fails a lot of the time.



Is there any way to add a delay of around 60 seconds before the application tries to mount?


An even better solution would be to test if there is an available network connection before running the rest of the script.



Please help.

MacBook Pro (Retina, 15-inch, Late 2013), OS X Mavericks (10.9.3)

Posted on May 21, 2014 3:08 AM

Reply
2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Auto mount network drives with delay AppleScript

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.