From the Sample Script collection, which you can download at the Ecoomy-x-Talk homepage:

on ejectVolumes()
  set ull to {}
  tell application "Finder"
    set ull to disks
    repeat with i from 1 to (the number of items of ull)
       if ejectable of item i of ull then eject (item i of ull)
    end repeat
  end tell
end ejectVolumes

The script in the Sample Script Stack is for Mac OS 9. In the original script, "put away" us used instead of "eject". So, for Mac OS 9, that line would be

  if ejectable of item i of ull then put away (item i of ull)

I don't know a solution for Windows yet. I suspect it will be a VB script, but there is also a utility eject.exe at this web site, which may be useful (I haven't tried myself): <http://www.kohnos.net/tools/ tools.html>.

On Linux, and probably on Mac OS X and other Unices, you should (also) be able to use the following or a similar shell command:

  # umount /mnt/cdrom

Best,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Download ErrorLib at http://economy-x-talk.com/developers.html and get full control of error handling in Revolution.



Op 26-jul-2006, om 21:02 heeft Viktoras Didziulis het volgende geschreven:

is there a way to eject usb flash drive or cd/dvd disk from within a Rev app
running from the same drive ?

All the best!
Viktoras

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to