Skip to content

Instantly share code, notes, and snippets.

@brigand
Created August 4, 2012 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brigand/3254028 to your computer and use it in GitHub Desktop.
Save brigand/3254028 to your computer and use it in GitHub Desktop.
Find YouTube channels that are available, example for AutoHotkey ActiveX controls
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