Code: Select all
Run, https://abc.com/categoryA/SearchTerm
if 404
Run, https://abc.com/categoryB/SearchTerm
if 404
Run, https://abc.com/categoryC/SearchTerm
if 404, do not launch browser at all
Code: Select all
Run, https://abc.com/categoryA/SearchTerm
if 404
Run, https://abc.com/categoryB/SearchTerm
if 404
Run, https://abc.com/categoryC/SearchTerm
if 404, do not launch browser at all
Code: Select all
OpenIfNot404("https://abc.com/categoryA/SearchTerm")
OpenIfNot404("https://www.autohotkey.com/boards")
OpenIfNot404("https://www.autohotkey.com/boards/viewtopic.php?f=76&t=93166")
return
OpenIfNot404(url) {
hObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
hObject.Open("GET",url)
hObject.Send()
if !InStr(hObject.ResponseText, "404")
Run chrome.exe %url%
}
Code: Select all
OpenIfNot404("https://www.autohotkey.com/boards/viewtopic.php?f=76&t=93166&p=412515#p412515")
return
OpenIfNot404(url) {
hObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
hObject.Open("GET",url)
hObject.Send()
if !InStr(hObject.ResponseText, "404")
Run chrome.exe %url%
}
Code: Select all
OpenIfNot404("https://abc.com/categoryA/SearchTerm")
OpenIfNot404("https://www.autohotkey.com/boards")
OpenIfNot404("https://www.autohotkey.com/boards/viewtopic.php?f=76&t=93166")
return
OpenIfNot404(url) {
Whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
Whr.Open("GET", url)
Whr.Send()
MsgBox, % Whr.status
}
Users browsing this forum: No registered users and 215 guests