일부 AppleScript를 작성하여 Alphred를 Keyboard Maestro로 토글하려고합니다. Alfred가 창으로 활성화되지 않은 것처럼 보이기 때문에 Alfred 창을 비활성화하기 위해 현재 사용하고 있지만 사용하지 않는 코드가 있습니다. AppleScript : Toggle Alfred
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
해결책을 찾기 위해 도움이 필요
...감사합니다.