Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Applescript输入文本以在浏览器中查找栏_Applescript - Fatal编程技术网

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 然后如何向查找搜索输入字符串?谢谢。这是可行的,但您是否也

我可以使用以下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

然后如何向查找搜索输入字符串?

谢谢。这是可行的,但您是否也知道如何单击查找栏中的项目,或者检查其中是否已包含文本?我的最终目标是将脚本分配给一个键绑定,这样我就可以在一个命令中同时使用“查找”和“再次查找”。不确定是否可以使用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