Re: Auto start server/program
Re: Auto start server/program
- Subject: Re: Auto start server/program
- From: email@hidden
- Date: Thu, 11 Jul 2002 22:21:16 EDT
In a message dated 7/10/2002 7:24:21 PM, Ray Boaz writes:
(snip)
>
>
I need help on how to solve these problems:
>
1. Test for network connection (access to server) maybe it really takes
>
30 seconds to check?
We used to have trouble with volume mounting at startup. My guess was that we
were trying to mount the volume before the network connection was
established, so I inserted this snippet at the beginning of the startup
script:
tell application "Network Browser"
activate
delay 2
quit
end tell
>
2. Report status Server Unavailable and halt OR continue script want
>
to put in MY message
First off, you don't need to wrap your "mount volume" line in a Finder tell
block.
Mount volume works just fine all by itself.
What I think you want to do is wrap it in a "try" block and then trap the
known errors and explain them in your own words. Here's what I use:
if errNum is 101 then
display dialog "Can't find network zones. Please call 4255." buttons
"OK" default button 1 with icon 2 giving up after 30
else if errNum is -3162 then
display dialog "Can't establish a network connection. Please try
again or call 4255." buttons "OK" default button "OK" with icon 2 giving up
after 30
else if errNum is -5016 then
display dialog "The server cannot be found on the network. Please
call 4255." buttons "OK" default button "OK" with icon 2 giving up after 30
else if errNum is -35 then
display dialog "The volume cannot be found on the network. Please
call 4255." buttons "OK" default button "OK" with icon 2 giving up after 30
else if errNum is -1712 then -- script timed out
beep
else
display dialog "Unknown network error. Please call 4255." & return &
return & "Error " & errNum buttons "OK" default button 1 with icon 2 giving
up after 30
end if
Your error codes (and help desk phone number) will, obviously, vary
>
3. Automatically log on server (no hold up at Connect ) dialog box
We're not using IP, but I seem to recall some test that indicate that you can
around this by setting up a common keychain on each Mac and then unlocking
the keychain via script.
HTH
Robert Kyle
Star Tribune
Minneapolis
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.