Hi,
I have written the following script for mounting servers and it works fine until the select dsik section.
The error log shows the following:
tell application “Finder”
activate
select disk {“bm transit”}
→ Finder got an error: A descriptor type mismatch occurred.
It works fine if I hard code the server name. Why does the array not work?
Any help would be much appreciated.
Best wishes
Michael
set the number_of_servers to 3
set the server_shares to {{“afp:/at/BHWG Studio Server 2/bm transit”}, {“afp:/at/BHWG Studio Server 3/misc clients”}, {“afp:/at/studio-server-1/ch2”}}
set the server_mounts to {{“bm transit”}, {“misc clients”}, {“ch2”}}
set the user to “???”
set the pw to “???”
repeat with i from 1 to number_of_servers
set the server to item i of server_shares
mount volume server as user name user with password pw
end repeat
tell application “Finder”
activate
set the y to 50
set the x to 50
repeat with i from 1 to 3
set the deskshares to item i of server_mounts
–set the d to i + 2
select disk deskshares
open selection
set the bounds of front window to {60, 60, 300, 150}
set position of front window to {x, y}
set the current view of front window to list view
set the x to the x + 250
if the x is 1050 then set y to the y + 120
if the x is 1050 then set the x to 50
end repeat
end tell