トップページ > コンテンツ > プログラミング入門 > UWSC入門 > UWSCでのIE操作

IE=CreateOLEObj("InternetExplorer.Application") //既に開いている時→IE = GETACTIVEOLEOBJ("InternetExplorer.Application", "タイトル")
IE.Visible = True
IE.navigate(URL) //別タブで開きたい場合は、IE.navigate2(URL,$800)のように記述する。
REPEAT
SLEEP(0.1)
UNTIL !IE.busy AND IE.readystate=4

//例1:プルダウンメニューから特定の値を選択する
/*optionのテキスト値から指定する方法*/
dim test = IE.getElementsByName("select名").item(0)
for i = 0 to test.length() -1
   if test.options(i).innerText ="選択したい値" then test.options(i).selected = true
next

/*value値から指定する方法*/
dim test = IE.getElementsByName("select名").item(0)
IE.document.ByName("select名").item(0).value="選択したいvalue値"
IE.document.ByName("select名").item(0).fireEvent("OnChange")

//例2:フォームを入力して送信する
IFB ie.forms["xxx"] <> NOTHING THEN
    ie.document.forms["xxx"].elements["yyy"].value="Value-data"
    ie.forms["xxx"].submit();

  • 画像リンクのクリックは

  • 通知バーはAlt+Nで移動。Alt+S等でショートカットボタンを押す事が可能。
最終更新:2016年03月20日 21:29