AppleScript:如何在全屏模式下激活应用程序?
AppleScript: How do I activate an app when it is in fullscreen mode?
我试过 tell application Emacs to activate
但当 emacs 处于全屏模式并改为聚焦桌面时它不起作用(在 emacs 上设置了工具栏)。
如果您谈论的是 Emacs For Mac OS X,那么 Emacs.app 的 Dock Tile 应该显示在 Dock 上,假设 Emacs.app [=44 只有一次出现,您可以将焦点设置为全屏显示=]ning,使用以下 AppleScript code:
if application "Emacs" is running then
tell application "System Events" to click UI element "Emacs" of list 1 of application process "Dock"
end if
通过单击 Dock Tile,它会将您带到全屏事件,然后您可以在其中 运行 其他 code您的 脚本 与 Emacs 交互。显然,如果 Emacs 不在全屏视图中,这将使 Emacs window 像 tell application "Emacs" to activate
一样向前移动。
我试过 tell application Emacs to activate
但当 emacs 处于全屏模式并改为聚焦桌面时它不起作用(在 emacs 上设置了工具栏)。
如果您谈论的是 Emacs For Mac OS X,那么 Emacs.app 的 Dock Tile 应该显示在 Dock 上,假设 Emacs.app [=44 只有一次出现,您可以将焦点设置为全屏显示=]ning,使用以下 AppleScript code:
if application "Emacs" is running then
tell application "System Events" to click UI element "Emacs" of list 1 of application process "Dock"
end if
通过单击 Dock Tile,它会将您带到全屏事件,然后您可以在其中 运行 其他 code您的 脚本 与 Emacs 交互。显然,如果 Emacs 不在全屏视图中,这将使 Emacs window 像 tell application "Emacs" to activate
一样向前移动。