2015-02-02 1 views
1

나는 Dragon Naturally speaking software에 매우 익숙하다. 그리고 주로 웹 응용 프로그램에 사용합니다. 모든 버튼과 다른 요소를 탐색 할 수 있지만 파일을 업로드하는 데 사용되는 '찾아보기'버튼은 탐색 할 수 없습니다. alt, title 및 name 속성을 추가했지만 용을 인식하지 못했습니다. <input type="file" title="Upload file" alt="Upload file" name="upload">Dragon Naturally Speaking Software를 사용하여 Browse 버튼을 클릭하라는 명령이 있습니까?

업로드 버튼을 클릭하는 특정 명령이 있습니까? 아니면 사용자 정의 명령을 작성해야합니까? 브라우저가 마이크로 소프트 인터넷 익스플로러, 그리고 당신이 "찾아보기"버튼의 ID를 알고있는 경우

답변

1

,이 코드는 당신을 위해 그것을 클릭해야합니다

Sub Main 
    Dim wb As Object ' prepare a web browser object 
    Set wb = CreateObject("Shell.Application").Windows.Item(0) ' set the wb object to the active window, namely Item(0) 
    wb.Visible = True ' wb must be visible to the code for it to act 
    wb.Document.getElementByID("the_exact_ID_name_of_the_element").click() ' the element ID can also be passed in as a variable 
    Set wb = Nothing 
End Sub 

당신이 요소 ID가없는 경우 색인 또는 클래스 또는 제어 유형별로 항목을 선택할 수 있습니다.