Applescript输入文本以在浏览器中查找栏
我可以使用以下applescript启动“查找”操作:Applescript输入文本以在浏览器中查找栏,applescript,Applescript,我可以使用以下applescript启动“查找”操作: activate application "Firefox" tell application "System Events" tell process "Firefox" click menu item "Find" of menu 1 of menu bar item "Edit" of menu bar 1 end tell end tell 然后如何向查找搜索输入字符串?谢谢。这是可行的,但您是否也
activate application "Firefox"
tell application "System Events"
tell process "Firefox"
click menu item "Find" of menu 1 of menu bar item "Edit" of menu bar 1
end tell
end tell
然后如何向查找搜索输入字符串?谢谢。这是可行的,但您是否也知道如何单击查找栏中的项目,或者检查其中是否已包含文本?我的最终目标是将脚本分配给一个键绑定,这样我就可以在一个命令中同时使用“查找”和“再次查找”。不确定是否可以使用applescript在Firefox中运行javascript。在safari中,有一个运行js的选项。或者,您可以使用命令down再次执行
击键“f”进行火力搜索,并继续执行击键返回
以查找下一项。
activate application "Firefox"
tell application "System Events"
tell process "Firefox"
click menu item "Find" of menu 1 of menu bar item "Edit" of menu bar 1
end tell
keystroke myString
keystroke return
end tell