How to set the timeout of Connect to Server dialog

I have a file server on my home network that I’m trying to script an autoconnect to, since it’s not always running. Since it’s IP address changes based on the order of startup of my other computers connected to the network, I’m trying to make the script cyle through different IP’s until the share is mounted. The thing is, the default retry timeout of the Finder’s Connect to Server is 120 seconds, which is painfully long. So if the first couple of IP’s that the script tries are not available, the script has to wait 240 seconds! I tried the “with timeout of 20 seconds”, but this doesn’t work–I get an applescript event timeout error. Does anyone know how I can change the default connect to server timeout, or even better yet, a better way to accomplish this? Here’s what I have so far (which doesn’t work):


[This script was automatically tagged for color coded syntax by
Convert Script to Markup Code]

Basically, I need a script that will periodically be run by cron, check if the volume “Files” is already mounted (and actually, since I use this laptop away from home, I’d like some sort of check to see if I’m even connected to the network to begin with), and cycle through ip’s 10.0.1.3-6. Any help would be sincerely appreciated.