我没有找到在 Chrome 中隐藏工具栏的任何方法,但请尝试以下脚本:
tell application "Google Chrome"
open location "http://example.com"
tell window 1 to enter presentation mode
end tell
tell application "Google Chrome"
tell (make new window)
set URL of active tab to "http://example.com"
set bounds to {0, 22, 1200, 900}
end tell
activate
end tell
tell application "Safari"
make new document with properties {URL:"http://example.com"}
tell window 1
set bounds to {0, 22, 1200, 900}
end tell
activate
end tell
tell application "System Events" to tell process "Safari"
tell menu "View" of menu bar 1
if exists menu item "Hide Toolbar" then click menu item "Hide Toolbar"
if exists menu item "Hide Status Bar" then click menu item "Hide Status Bar"
if exists menu item "Hide Tab Bar" then click menu item "Hide Tab Bar"
if exists menu item "Hide Bookmarks Bar" then click menu item "Hide Bookmarks Bar"
end tell
end tell