display

hi
is there any simple script that on run just display a list of mounted volumes.

thanks

list disks

Hi :slight_smile:
Here two suggestions:

tell application "Finder" to set Lst to (name of every disk)
choose from list Lst with prompt "List of mounted disk:"

… and if you want copy/paste the list:

set AppleScript's text item delimiters to return
tell application "Finder" to set Lst to (name of every disk) as text
set AppleScript's text item delimiters to ""
set the clipboard to Lst
display dialog Lst

:wink:

Wohw Greg… i like this :wink:

Ok, now:

choose from list (list disks) with prompt "Mounted disks:"

YEA :smiley:

thanks guys
i like it
but i don’t want that user have to choose the drive and say O.K.
I want it to be very simple like the first script of fredo
but I don’t want “Macantosh HD” to be shown in the list

something like this

tell application "Finder" to set disk_ to name of disks whose startup is false
choose from list disk_ with prompt "List of mounted disk:"

but I don’t want any prompt to select the drive
I just one button to close the dialog box.

thanks

Hi :slight_smile:
Here 2 propositions:

set AppleScript's text item delimiters to return
tell application "Finder" to ¬
	display dialog "" & {"List of disk:", "", ""} & ¬
		(name of disks whose startup is false) ¬
			buttons "Ok" default button 1 with icon 1
set AppleScript's text item delimiters to ""
set AppleScript's text item delimiters to return
display dialog "" & {"List of disk:", "", ""} & ¬
	(items 2 thru end of (list disks)) ¬
		buttons "Ok" default button 1 with icon 1
set AppleScript's text item delimiters to ""

:wink:

thanks fredo
thats great