Applescript 新手问题又来了:) 我正在尝试创建一个小 applescript,它允许我从当前运行的应用程序列表中选择多个项目,然后退出这些选定的应用程序。像这样的东西是可行的,但不必单击每个对话框,从列表中进行选择会更容易。
tell application "System Events"
repeat with p in every process
if background only of p is false then
display dialog "Would you like to quit " & name of p & "?" as string
end if
end repeat
end tell
任何和所有的帮助将不胜感激!
Thanks!
尝试这个:
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
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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)