Applescript get list of running apps?

前端 未结 8 1144
梦谈多话
梦谈多话 2020-12-30 05:47

Applescript newbie question again :) I am trying to create a small applescript that will allow me to select multiple items from a list of currently running applications and

8条回答
  •  礼貌的吻别
    2020-12-30 06:23

    tell application "System Events"
        set processList to get the name of every process whose background only is false
        set processNameList to choose from list processList with prompt "Select process to quit" with multiple selections allowed
        if the result is not false then
            repeat with processName in processNameList
                do shell script "Killall " & quoted form of processName
            end repeat
        end if
    end tell
    

    enter image description here

提交回复
热议问题