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コマンドは System Events によって提供されます。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 に答える