Applescript输入文本在浏览器中查找栏

时间:2017-09-30 09:54:10

标签: 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

如何将字符串输入到搜索搜索?

1 个答案:

答案 0 :(得分:1)

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