OK, try this:
List and Eject Disks [ver 2.1].kmmacros (2.3 KB)
It will now remember the previously ejected disk and preselect it in the dialog. If it’s the desired disk you can press OK, if not you can navigate with the arrows.
If the previously ejected disk is not available, it will select the first disk in the list.
tell application "Keyboard Maestro Engine" to set diskToEject to getvariable "previousDisk"
tell application "Finder" to set diskList to name of every disk whose ejectable is true
if diskList does not contain diskToEject then set diskToEject to first item of diskList
tell application (path to frontmost application as text) to set diskToEject to choose from list diskList with title "Eject Disk" with prompt "Select disk(s) to eject:" default items diskToEject with multiple selections allowed
if diskToEject is not false then
tell application "Finder" to eject diskToEject
tell application "Keyboard Maestro Engine" to setvariable "previousDisk" to diskToEject
end if