当我按下快捷键时,我想打开一个新的google chrome窗口。
我有一个与MacBook连接的液晶显示器,这意味着两个屏幕。MacBook有台式机1台式机2,液晶屏有台式机3台式机4。
tell application "/Applications/Google Chrome.app"
make new window
open location "https://www.google.com/"
activate
end tell
使用Automator将其另存为Quick Action,并在键盘设置中设置快捷键。
它在LCD台式机上运行良好,但无法在MacBook台式机上打开chrome。
我尝试使桌面1聚焦,并按快捷键,它只能打开新的铬在当前桌面(3或4),这是在液晶屏上,从来没有打开在MacBook上。
发布于 2019-04-08 04:55:31
使用最新版本的macOS Mojave时,此AppleScript代码适用于我。
tell application "Google Chrome"
activate
set newWindow to (make new window)
repeat while loading of active tab of newWindow
delay 0.1
end repeat
set URL of active tab of newWindow to "https://www.google.com/"
end tell
连接两个显示器后,假设您在系统首选项中进行了适当的设置(如下图所示),您应该能够在dock和options菜单中右键单击Google Chrome图标...您可以选择希望Google Chrome显示的显示器和桌面。
https://stackoverflow.com/questions/55542091
复制相似问题