我需要一个苹果脚本来全屏打开 safari 并隐藏小牛上的工具栏 [英] i need an applescript to open safari in full screen an to hide the toolbar on mavericks
问题描述
我需要一个 applescript 来全屏打开 safari 并隐藏小牛上的工具栏.
I need an applescript to open safari in full screen an to hide the toolbar on mavericks.
听起来很简单,其实不然!
it sounds easy but it isnt!
我需要打开 safari,然后以全屏模式打开谷歌,然后隐藏工具栏.
i need to open safari then open google in full screen mode an then hide the toolbar.
它与下面的示例等效,但用于 safari
it would be the equivilent to the below sample but instead for safari
告诉应用程序谷歌浏览器"打开位置 "http://internet.ceo.wa.edu.au/Pages/默认.aspx"最后告诉
tell application "Google Chrome" open location "http://internet.ceo.wa.edu.au/Pages/default.aspx" end tell
告诉应用程序谷歌浏览器"激活告诉应用程序系统事件"使用 {command down, shift down} 击键 "f"最后告诉
tell application "Google Chrome" to activate tell application "System Events" keystroke "f" using {command down, shift down} end tell
推荐答案
简单的方法:
set MyApps to {"Google Chrome", "Skype", "Finder"}
repeat with MyApp in MyApps
tell application MyApp
activate
delay 3
tell application "System Events" to tell process MyApp
set value of attribute "AXFullScreen" of window 1 to true
end tell
end tell
end repeat
这篇关于我需要一个苹果脚本来全屏打开 safari 并隐藏小牛上的工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!