Este es el AppleScript que estoy utilizando..
tell application "System Events"
set listOfProcesses to (name of every process where background only is false)
tell me to set selectedProcesses to choose from list listOfProcesses with multiple selections allowed
set myResult to ""
end tell
--The variable selectedProcesses will contain the list of selected items.
repeat with processName in selectedProcesses
do shell script "Killall " & quoted form of processName
end repeat
repeat with s in every string in selectedProcesses
set myResult to myResult & " ," & s
end repeat
tell application "Finder" to display notification "Apps closed successfully:
" & selectedProcesses
Por favor, dime una manera de separar a los resultados en displayNotification por una coma. En este caso, las dos aplicaciones son Notas y recordatorios.. La Notificación se parece a esto-