How do I make a Safari window active using AppleScript (elegantly)?

北城余情 提交于 2019-12-06 13:23:35
regulus6633

I also noticed that changing the index does reorder the windows however the new window does not actually come to the front. By playing around I found you can fix that by playing with the "visible" property...

tell application "Safari"
    set theWindows to windows
    set win2 to item 2 of theWindows
    tell win2
        set visible to false
        set visible to true
        set index to 1
    end tell
end tell
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!