<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title></title>
</head>

<body>
<pre>


○○○IE検索.vbs



strURL = "https://ukiuki.in/"

main()

sub main()

    'ウインドウを検索
    Dim objIE : Set objIE = Nothing
    Dim objShell : Set objShell = CreateObject("Shell.Application")
    Dim objWindow
    For Each objWindow In objShell.Windows
        'TypeNameでオブジェクト変数のタイプを表示する
        'HTMLDocumentだったら
        If TypeName(objWindow.document) = "HTMLDocument" Then
           If left(objWindow.document.URL,18) = strURL Then
               set objIE = objWindow '見つけたウインドウを(IE)を代入
               Exit For   
           End IF
        End If
    Next
    Set objShell = Nothing

    '見つけたかチェック
    If objIE Is Nothing Then
        msgbox "エラー"
        wscript.quit
    End If   

'categoryID
	
	dim elms
	set elms = objIE.document.getElementById("categoryID")
    selectItem elms, "自動車関係"

'amount
	set elms =  objIE.document.getElementById("amount")
	elms.value = "200"

end sub


'----------------------------
sub selectItem( byVal elms, byVal Val )
    
    'objIE.document.all("pref")(2).Selected = True
    
    for i=0 to elms.length
    	if elms(i).text = Val then
    		elms(i).selected = true
    		elms.fireEvent("onchange")
    		exit for
    	end if
    next
end sub


</pre>
</body>
