如何检测firefox的窗口索引?
我正在尝试使用 Applescript 获取桌面上 Firefox 的窗口索引(位置)。 我已经到了这里,但我不知道如何继续。有人能给我一些示例代码或线索吗? :-|
tell application "System Events"
set programs to processes whose visible is true and name is "firefox-bin" or name is "google chrome" or name is "safari"
repeat with program in programs
tell window of application program
#XXX do something
end tell
end repeat
end tell
I'm trying to get the window index (position) firefox on desktop with Applescript.
I got to this far but I don't know how to proceed. Can somebody point to me some example code or clue. :-|
tell application "System Events"
set programs to processes whose visible is true and name is "firefox-bin" or name is "google chrome" or name is "safari"
repeat with program in programs
tell window of application program
#XXX do something
end tell
end repeat
end tell
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须知道要识别的窗口的一些属性。在我的示例中,我假设您知道窗口的名称。
You have to know some property of the window you want to identify. In my example I assume you know the name of the window.