Wil*_*ill 17 mac window applescript osx-mountain-lion macos
我想让一个应用程序在当前空间中打开一个新窗口而不切换到一个窗口已经打开的空间,但我想保留
切换到应用程序时,切换到应用程序打开窗口的空间
在System Preferences > Mission Control 中设置。
换句话说,我想告诉应用程序直接打开一个新窗口,而不是先告诉它activate
.
我怎样才能用 AppleScript 做到这一点(如果可能的话)?
Lri*_*Lri 23
某些应用程序具有在其 Dock 上下文菜单中打开新窗口的操作。
不同应用的其他选项:
tell application "TextEdit"
make new document
activate
end tell
tell application "Safari"
make new document at end of documents with properties {URL:"http://g.co"}
activate
end tell
tell application "Terminal"
do script ""
activate
end tell
tell application "System Events" to tell process "iTerm"
click menu item "New Window" of menu "Shell" of menu bar 1
set frontmost to true
end tell
tell application "Google Chrome"
make new window
activate
end tell
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
12658 次 |
最近记录: |