添加 Quit All Apps 脚本以退出所有运行中的应用程序
This commit is contained in:
23
applescript/quit-all-apps.applescript
Executable file
23
applescript/quit-all-apps.applescript
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/osascript
|
||||||
|
|
||||||
|
# Required parameters:
|
||||||
|
# @raycast.schemaVersion 1
|
||||||
|
# @raycast.title Quit All Apps
|
||||||
|
# @raycast.mode silent
|
||||||
|
# @raycast.packageName System
|
||||||
|
|
||||||
|
# Optional parameters:
|
||||||
|
# @raycast.icon 🛑
|
||||||
|
|
||||||
|
# Documentation:
|
||||||
|
# @raycast.description Quits all running applications.
|
||||||
|
|
||||||
|
tell application "System Events"
|
||||||
|
set allApps to application processes whose background only is false
|
||||||
|
repeat with appProc in allApps
|
||||||
|
set appName to name of appProc
|
||||||
|
try
|
||||||
|
tell application appName to quit
|
||||||
|
end try
|
||||||
|
end repeat
|
||||||
|
end tell
|
||||||
Reference in New Issue
Block a user