I'm currently trying to have drives be automatically mounted when I'm connected to my network. Only problem is that when I'm not connected to my network an error shows, while connected to the network no errors show. How would I disable this?
Here's my current script:
tell application "Finder"
mount volume "smb://(IP)/(Drive)" as user name "(user)"
end tell
This is a simple handler to check the network connection. It works with both Ethernet and WiFi connections.
Adjust the values in the first two lines if necessary.