0

嗨,我正在研究一个简单的路由器破解程序,这部分无法编译(这是用于搜索路由器 ip,以便您找到它的服务提供商)(如果你得到它)

tell application "Safari"
activate
open location "http://www.techspot.com/guides/287-default-router-ip-addresses/"
keystroke "f" using {command down, shift down}
set search to text returned of (display dialog "router ip" default answer "" buttons {"cancel", "find it"} default button 2)
search
keystroke "enter" using {command down, shift down}
4

1 回答 1

1

正如 DigiMonk 所说,该keystroke命令由系统事件提供。您还可以使用 UI 脚本来填充搜索字段:

tell application "Safari"
    activate
    open location "http://www.techspot.com/guides/287-default-router-ip-addresses/"
    set search to text returned of (display dialog "router ip" default answer "")
end tell
tell application "System Events"
    keystroke "f" using command down
    tell process "Safari"
        tell group 1 of group 1 of window 1
            set value of text field 1 to search
            click button 1
        end tell
    end tell
end tell
于 2013-10-09T14:48:45.983 回答