1
我想通過編寫一些Applescript切換阿爾弗雷德通過鍵盤大師。這裏是我現在使用的代碼,但不能用於取消激活Alfred窗口,因爲它看起來像Alfred沒有被激活爲窗口。Applescript:切換阿爾弗雷德
set appName to "Alfred 3"
set is_start to false
tell application "System Events"
if not (exists process appName) then
set is_start to true
else
if visible of process appName then
set visible of process appName to false
else
set frontmost of process appName to true
end if
end if
end tell
tell application "Alfred 3"
reopen -- open a default window if there are no open windows
activate -- make frontmost
end tell
需要一些幫助,以找到一個解決辦法...
感謝。