property diskname1 : "Websites" property diskpath1 : "Macintosh HD:Websites.sparseimage" property diskname2 : "Lockbox" property diskpath2 : "Macintosh HD:Lockbox.sparseimage" property diskname3 : "Client Bank" property diskpath3 : "Macintosh HD:Client Bank.sparseimage" property diskname4 : "Family Documents" property diskpath4 : "Macintosh HD:Family Documents.sparseimage" on run set thePassword to "none" set passwordBox to display dialog "Enter the password:" buttons {"Cancel", "OK"} default button {"OK"} default answer "" with icon 2 giving up after 30 with hidden answer if gave up of passwordBox is true then set myButton to "Cancel" quit else set thePassword to the text returned of passwordBox end if tell application "Finder" if not (exists the disk diskname1) then do shell script ("hdiutil attach " & quoted form of ¬ POSIX path of (diskpath1 as string) & " -mount required -passphrase " & thePassword) repeat until name of every disk contains diskname1 delay 1 end repeat end if end tell tell application "Finder" if not (exists the disk diskname2) then do shell script ("hdiutil attach " & quoted form of ¬ POSIX path of (diskpath2 as string) & " -mount required -passphrase " & thePassword) repeat until name of every disk contains diskname2 delay 1 end repeat end if end tell tell application "Finder" if not (exists the disk diskname3) then do shell script ("hdiutil attach " & quoted form of ¬ POSIX path of (diskpath3 as string) & " -mount required -passphrase " & thePassword) repeat until name of every disk contains diskname3 delay 1 end repeat end if end tell tell application "Finder" if not (exists the disk diskname4) then do shell script ("hdiutil attach " & quoted form of ¬ POSIX path of (diskpath4 as string) & " -mount required -passphrase " & thePassword) repeat until name of every disk contains diskname4 delay 1 end repeat end if end tell end run