Created
August 4, 2012 03:32
-
-
Save brigand/3254028 to your computer and use it in GitHub Desktop.
Find YouTube channels that are available, example for AutoHotkey ActiveX controls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gui Add, Edit, w600 r1 vURL, aboutscript | |
Gui Add, Button, x+6 yp w44 Default, Go | |
Gui Add, ActiveX, xm w600 h540 vWB, Shell.Explorer | |
ComObjConnect(WB, WB_events) ; Connect WB's events to the WB_events class object. | |
Gui, Add, Edit, ys vOutput w200 h540 | |
Gui Show | |
; Continue on to load the initial page: | |
ButtonGo: | |
Gui Submit, NoHide | |
WB.Navigate("youtube.com/user/" URL) | |
return | |
class WB_events | |
{ | |
DocumentComplete(wbo, NewURL) | |
{ | |
global | |
Gui, Submit, NoHide | |
html := wb.document.body.innerHTML | |
if InStr(html, "/error?src=404&ifr=1&error=""") | |
and not InStr(output, url "`n") | |
Output .= URL "`n" | |
GuiControl,, Output, %Output% ; Update the URL edit control. | |
} | |
} | |
GuiClose: | |
ExitApp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment