ふらっとVisual C#,C♯,C#(初心者用) Part111
■ このスレッドは過去ログ倉庫に格納されています
0515コード�@
2014/05/26(月) 11:03:16.41ID:C5RAjArjie.Quit(); をしているので本来は閉じないといけないのですが、、、
SHDocVw.InternetExplorer ie;
mshtml.IHTMLElementCollection mshtml_ec;
do
{
ie = new SHDocVw.InternetExplorer();
string url = "http://yahoo.co.jp";
ie.Navigate(url, null, null, null, null);
ie.Visible = true;
while (ie.ReadyState != SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE || ie.Busy)
{
Application.DoEvents();
}
//検索ワードを入力
mshtml_ec = ie.Document.getElementsByTagName("input");
foreach (mshtml.IHTMLElement i_ele in mshtml_ec)
{
if (i_ele.getAttribute("id") != null)
{
string chk_id = i_ele.getAttribute("id");
if (chk_id == "srchtxt")
{
i_ele.setAttribute("value", "まんこ汁");
break;
}
}
}
■ このスレッドは過去ログ倉庫に格納されています