try # hier versuchen, die Laufwerke zu mounten end try
tell application "Finder" try mount volume "smb://volume1" as user name "Zwiebelfisch" mount volume "smb://volume2" as user name "Zwiebelfisch" end try end tell
-- (0) Check to see if there server exists by pinging it set max_retry to 60 set k to 0 repeat while (do shell script "ping -c 1 some_server") contains "100% packet loss" delay 5 set k to k + 1 if k > max_retry then error "Server is not responding for predefined period." number 8000 end repeat -- (1) It exists, mount the volume tell application "Finder" try mount volume "smb://USERNAME:PASSWORD@some_server/SHARENAME" delay 1 end try end tell
try mount volume "smb://volume1" as user name "Zwiebelfisch" with password "xyz" mount volume "smb://volume2" as user name "Zwiebelfisch" with password "xyz" end try
# prüfen, ob das Voulume gemountet ist ... tell application "Finder" to set vol1_isMounted to (exists disk "smb://volume1") # ... falls nicht, versuchen das Mounten vorzunehmen if vol1_isMounted is false then try mount volume "smb://volume1" as user name "Zwiebelfisch" with password "xyz" on error display dialog "\"volume1\" kann nicht gemountet werden." buttons "OK" default button 1 with icon 2 error number -128 end try end if
| 15.06.2023