True AHK Class: Lbbrowse3.dll
This is my instructional tutorial that will explain how I use lbbrowse3 to load an IE window in an Ahk Gui.
Example Lbbrowse3 I – Club Live Selector
Code:
Name = [FLPO] Club Live Selector
CheckForDll:
;=========================================================================
IfNotExist, lbbrowse3.dll
Goto, Lbbrowse3
LBBHandle := DllCall("LoadLibrary", "str", "lbbrowse3.dll")
CreatGui:
;=========================================================================
Gui,Add,Text,x6 y416,Navigate to |
Gui,Add,Button,gChick x+4 y410, Chicktionary
Gui,Add,Button,gBee x+4 y410, Spelling Bee
Gui,Add,Button,gSlugger x+4 y410, Word Slugger
Gui,Show,w662,%Name%
WinGet,GuiID,ID,%Name%
XIE = 6 ;Browser X
YIE = 6 ;Browser Y
WIE = 650 ;Browser Width
HIE = 400 ;Browser Height
Url = http://www.club.live.com ;Starting Url
DLLCall("lbbrowse3\CreateBrowser","uInt",GuiID,"Int",XIE,"Int",YIE,"Int",WIE,"Int",HIE,"Str",Url,"Int",1)
DllCall("lbbrowse3\EnableBrowser","Int",1)
DllCall("lbbrowse3\ShowBrowser","Int",0)
DLLCall("lbbrowse3\MoveBrowser","Int",XIE,"Int",YIE,"Int",WIE,"Int",HIE)
return
;Games
;=========================================================================
Chick:
Url = http://club.live.com/Pages/Games/GamePlay.aspx?game=Chicktionary&mode=play
DllCall("lbbrowse3\Navigate", "str", Url)
return
Bee:
Url = http://club.live.com/Pages/Games/GamePlay.aspx?game=Spelling_Bee&mode=play
DllCall("lbbrowse3\Navigate", "str", Url)
return
Slugger:
Url = http://club.live.com/Pages/Games/GamePlay.aspx?game=Word_Slugger&mode=play
DllCall("lbbrowse3\Navigate", "str", Url)
return
Lbbrowse3: ;This area will give props to the author of lbbrowse and prompt the user to download the dll if it doesn't exits.
;=========================================================================
msgbox,262180,Start URL,This ahk-script requires lbbrowse3.dll`n`nDownload`n- lbbrowse3.dll`n`nfrom`nhttp://www.alycesrestaurant.com/lbbrowse.htm`n`nLBBROWSE.DLL is copyright Alyce Watson, 2005.`n`nWould you like to download lbbrowse3.dll now?
ifmsgbox,NO
{
exitapp
return
}
else
{
;run,http://www.alycesrestaurant.com/lbbrowse.htm
run,http://www.alycesrestaurant.com/zips/browsdll3.zip
exitapp
return
}
return
GuiClose: ;Executes upon closing the Gui.
ExitApp
Basic Controls:
DLLCall("lbbrowse3\CreateBrowser","uInt",GuiID,"In t",XIE,"Int",YIE,"Int",WIE,"Int",HIE,"Str",Url,"In t",1) ;Creates browser, sets, size, location, and starting url.
DllCall("LoadLibrary", "str", "lbbrowse3.dll") ;Nessacary to use lbbrowse3.dll
DllCall("lbbrowse3\ShowStatusbar","Int",0) ;Hide the statusbar.
DllCall("lbbrowse3\Navigate", "str", Url) ;Navigate the internet.
(I'll add some more upon request)
This is a simple script that will show you how to Navigate from one page to another. You can use lbbrowse for many things. One advantage is that this makes everyones display the same since you are creating the browser.