'objIE.Document.all.ypmOK.Click 'objIE.Document.aspj14.Click 'objIE.Document.all.aspj1.Click on error resume next objIE.Document.all.auc_bkname1.Value = "楽天(旧イーバンク)" objIE.Document.all.auc_bkname2.Value = "ジャパンネットバンク" objIE.Document.all.auc_bkname3.Value = "みずほ、郵貯、新生" on error goto 0 For Each objTAG In objIE.Document.all If objTAG.tagName = "INPUT" Then If objTAG.Value = "確認画面へ" Then objTAG.Click Exit For End If End If Next Call waitPage(objIE) For Each objTAG In objIE.Document.all If objTAG.tagName = "INPUT" Then If InStr(objTAG.Value, "利用規約") > 0 Then objTAG.Click Exit For End If End If Next Call waitPage(objIE) end function Set objIE = CreateObject("InternetExplorer.application") objIE.Visible = True dim url_id(50) kensuu = 0 total = 0 url = "http://openuser.auctions.yahoo.co.jp/jp/show/mystatus?select=selling" page = 1 c = 0
line = 2 msg = "error"
Do objIE.navigate url Call waitPage(objIE) s = objIE.Document.body.innerhtml ss = "ページ目を表示(合計:" s = Right(s, Len(s) - InStr(s, ss) - Len(ss) + 1) ss = "点)" total = 20 'CInt(Left(s, InStr(s, ss) - 1)) s = objIE.Document.body.innerhtml ss = "<TD align=left><A " s = Right(s, Len(s) - InStr(s, ss)) ' On Error GoTo 0 url_next = "" ii = CInt(objIE.Document.links.Length) - 1 For i = 0 To ii If objIE.Document.links(i).outertext = "次の50件" Then url_next = objIE.Document.links(i).href End If If objIE.Document.links(i).outertext = "残り時間" Then '"次の50件" Then ' i = i + 1 Exit For End If Next j = 0
wscript.Sleep 100
'Do While Right(objIE.Document.links(i).outertext, 4) <> "の50件" And objIE.Document.links.Length < i Do While objIE.Document.links.Length > i
If IsNumeric(objIE.Document.links(i).outertext) = False And objIE.Document.links(i).outertext <> "管理" Then If InStr(objIE.Document.links(i).href, "http://help") = 0 Then 'ヘルプ 除外 If InStr(objIE.Document.links(i).href, "bid_hist?aID=") = 0 Then '入札件数 除外 If Left(objIE.Document.links(i).href, Len("http://page")) = "http://page" Then url_id(j) = objIE.Document.links(i).href 'href_text(j) = objIE.Document.links(i).outertext j = j + 1 Else 'Exit Do '50 または 終了 End If End If End If End If i = i + 1 Loop
id_cnt = j - 1 For i = 0 To id_cnt '~50件分オークションページへ kkkk=AucUpdate(url_id(i)) Next If url_next = "" Then Exit Do url = url_next Loop msg = "normal end" Sub waitPage (objIE) kan=false do while kan=false Do While objIE.busy Loop Do While objIE.Document.readyState <> "complete" Loop if instr(objIE.Document.body.outertext,"検索中のページは現在、利用できません。Web サイトに技術的な問題が発")=0 then kan=true else objIE.Refresh end if loop End Sub