Simple question: Updating a URL and Refreshing a Page

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
hellotherenjny
Posts: 8
Joined: 17 Oct 2021, 10:49

Simple question: Updating a URL and Refreshing a Page

Post by hellotherenjny » 25 Oct 2021, 07:57

Hello!

I'm trying to build a loop that updates a URL and refreshing a HTML page.

Do you know the best way to do this?

https://kind.krx.co.kr/common/disclsviewer.do?method=search&acptno=20211025000089&docno=&viewerhost=&viewerport=
https://kind.krx.co.kr/common/disclsviewer.do?method=search&acptno=20211025000090&docno=&viewerhost=&viewerport=
https://kind.krx.co.kr/common/disclsviewer.do?method=search&acptno=20211025000091&docno=&viewerhost=&viewerport=

I just need to create a loop that refreshes the page to the new number (89, 90, 91, etc.) when the header title is "not what I'm looking for".

Thanks for your help as always!

Code: Select all

	wb := ComObjCreate("InternetExplorer.Application")  
	wb.Visible := true                                  
	wb.Navigate("https://kind.krx.co.kr/common/disclsviewer.do?method=search&acptno=20211025000089&docno=&viewerhost=&viewerport=") 

	while wb.busy or wb.ReadyState != 4
		Sleep, 10
User avatar
mikeyww
Posts: 26605
Joined: 09 Sep 2014, 18:38

Re: Simple question: Updating a URL and Refreshing a Page

Post by mikeyww » 25 Oct 2021, 08:34

Code: Select all

Loop {
 WinClose, ahk_class IEFrame ahk_exe iexplore.exe
 wb := ComObjCreate("InternetExplorer.Application"), wb.Visible := True
 wb.Navigate("https://kind.krx.co.kr/common/disclsviewer.do?method=search&acptno=202110250000"
           . A_Index + 88 "&docno=&viewerhost=&viewerport=")
 While (wb.busy || wb.ReadyState != 4)
  Sleep, 100
 WinGetActiveTitle, title
 Sleep, 1000
} Until !Instr(title, "title does not contain this text")
MsgBox, 64, Success, Done!
hellotherenjny
Posts: 8
Joined: 17 Oct 2021, 10:49

Re: Simple question: Updating a URL and Refreshing a Page

Post by hellotherenjny » 26 Oct 2021, 08:45

Thanks again Mickey! Super helpful!
Post Reply

Return to “Ask for Help (v1)”