2013-10-08 2 views
0
f를

안녕하세요 메신저는 간단한 라우터 크래커 작업이 부분은 (당신이 그것을 얻을 경우)(AppleScript로) 캔트 사용 명령

(당신은 서비스 제공 업체를 찾을 수 있도록이 라우터의 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} 
+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