RE: Removable Disks
RE: Removable Disks
- Subject: RE: Removable Disks
- From: Jay Young <email@hidden>
- Date: Sat, 8 Nov 2003 01:59:34 -0600
Hi Christopher,
You could save a script as an 'application' and select 'Stay Open' from
the options in the 'Save As' dialog in order to keep the script running
constantly to check for any removable disks (after you save the script,
you'll need to double click on it's icon in order to start the script.
To quit the script you'll need to make it the 'active app' and then
either select quit from the menu or hit command-Q). I've set the code
up below to check every 60 seconds and if it sees a disk that can be
'ejected' it will display a dialog. This seems to work on OS 10.3.
Hope it helps.
Jay
--------------------------------------
on idle {}
tell application "Finder"
if (disks whose ejectable is true) exists then
display dialog "An ejectable 'disk' has been loaded"
end if
end tell
return 60
end idle
--------------------------------------
--
Christopher wrote:
>
HI All-
>
New to the list and pretty new to AppleScript-
>
I want a script to be able to detect when a removable disk is mounted-
CD, Compact Flash, Zip, etc. Is this possible with using AppleEvents or
otherwise?
>
--Christopher
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.