Access is denied - Web COM Help!

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
LukasL
Posts: 84
Joined: 16 Aug 2016, 14:35

Access is denied - Web COM Help!

16 Mar 2017, 08:45

Hey, I've got a piece of code that grabs elements on a webpage, and puts them into a CSV.

At the end it loops through into another page, and repeats the code, with the elements on the new page being identical to the code previous.


My problem is that once on this new page, I instantly get access is denied when trying to grab the elements that I had previously.

An example would be:

Code: Select all

<html>
<body>
<div>
	<span>THIS ITEM</span>
</div>
<a class="nextpage") href="ww...."></a>
</body>
</html>

Code: Select all

wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := True

Loop
{
	while wb.Busy || wb.ReadyState != 4
		Sleep, 100

	result := wb.document.getElementsByTagName("div")[0].getElementsByTagName("span")[0].innertext
	FileAppend, %result%`n, C:..
	wb.document.getElementsByClassName("nextpage")[0].click()
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: downstairs, Google [Bot], LRRUNB, OrangeCat and 156 guests