Heres the code, I marked down the section that i need help with
Code: Select all
SetWorkingDir %A_ScriptDir%
#SingleInstance, Force
Pagenumbers = 50
InputBox, Pages, OSRS Scraper, This is the last page used. `r`n `r`nPlease enter your new desired page numbers press enter to use the previously used one, ,,,,,,, %Pagenumbers%
Gui +AlwaysOnTop
Gui, Add, Edit, Readonly x10 y10 w125 h700 vDebug
Gui, Show, x150 y40 w145 h720, DebugWindow
URL := ComObjCreate( "InternetExplorer.Application" )
;==========================================================help here============================================
Loop,
{
URL.Navigate("https://secure.runescape.com/m=hiscore_oldschool/overall.ws?table=0&page=%A_Index%")
if (A_Index = Pages)
{
MsgBox, done!
ExitApp
break
}
While ( URL.Busy || URL.ReadyState != 4 )
sleep, 100
loop, 25
{
text := URL.document.getElementsByClassName("left").item(A_Index).innerText
DebugAppend(Text)
DebugAppend("`r`n")
FileAppend, %Text%`r`n, Scrapped.txt
}
}
;==========================================================help here============================================
DebugAppend(Data)
{
GuiControlGet, Debug
GuiControl,, Debug, %Debug%%Data%
}
DebugMessage(str)
{
global h_stdout
DebugConsoleInitialize()
str .= "`n"
DllCall("WriteFile", "uint", h_Stdout, "uint", &str, "uint", StrLen(str), "uint*", BytesWritten, "uint", NULL)
WinSet, Bottom,, ahk_id %h_stout%
}
DebugConsoleInitialize()
{
global h_Stdout
static is_open = 0
if (is_open = 1)
return
is_open := 1
DllCall("AttachConsole", int, -1, int)
DllCall("AllocConsole", int)
dllcall("SetConsoleTitle", "str","Paddy Debug Console")
h_Stdout := DllCall("GetStdHandle", "int", -11)
WinSet, Bottom,, ahk_id %h_stout%
WinActivate,Lightroom
return
}
~ESC::ExitApp