How to "remember" a disk alias
How to "remember" a disk alias
- Subject: How to "remember" a disk alias
- From: Irwin Poche <email@hidden>
- Date: Wed, 18 Apr 2001 21:54:10 -0500
The first time the script below runs it prompts for a choice of mounted
disks. After that it just opens the disk. I would expect that, if the disk
were not mounted, a "Please insert the disk..." message would be produced
just as the Finder does when an alias of an unmounted disk is opened.
Instead I get a -1753 error from a classic application and a "Could not run
the script because of an AppleScript error" from the Script Editor.
Does anyone know how to do this correctly ?
-Irwin
property disk_alias : ""
tell application "Finder"
if disk_alias is "" then
set disk_name to (choose from list (list disks)) as string
set disk_alias to disk disk_name as alias
end if
open disk_alias
end tell