I have written the following script, when I run it I get different results. Can someone tell me what I'm doing wrong? I am trying to automount AFP volumes without any user interface at startup. The script that is written will be placed in the login items one it works!
Here is the script:
property volumesToMount : {"afp://Mac31192.168.1.19/Fonts", ¬
"afp://Mac31192.168.1.19/Raid_0", ¬
"afp://Mac31192.168.1.19/Raid_1", ¬
"afp://Mac31192.168.1.19/Raid_2", ¬
"afp://Mac31192.168.1.19/Raid_4"}
repeat with thisVolume in volumesToMount
mountTry(thisVolume)
end repeat
on mountTry(thisVolume)
try
mount volume (thisVolume)
end try
end mountTry
The results I get are the first volume mounting with a login screen, the 3rd and 5th volume mounting, and volumes 0-4 mounting. I have never gotten all five volumes to mount without any user intervention.
Thanks in advance for your help!
sakohl
Here is the script:
property volumesToMount : {"afp://Mac31192.168.1.19/Fonts", ¬
"afp://Mac31192.168.1.19/Raid_0", ¬
"afp://Mac31192.168.1.19/Raid_1", ¬
"afp://Mac31192.168.1.19/Raid_2", ¬
"afp://Mac31192.168.1.19/Raid_4"}
repeat with thisVolume in volumesToMount
mountTry(thisVolume)
end repeat
on mountTry(thisVolume)
try
mount volume (thisVolume)
end try
end mountTry
The results I get are the first volume mounting with a login screen, the 3rd and 5th volume mounting, and volumes 0-4 mounting. I have never gotten all five volumes to mount without any user intervention.
Thanks in advance for your help!
sakohl