MODIFIED, don't know how to start second time new browser
Variable submit works, newstart with clear
#include COM.ahk ;--- put COM.ak to C:\Programme\AutoHotkey\Lib and remove here -----
SetWorkingDir %A_ScriptDir%
Gui,2: Add, Button, x6 y50 w120 h20 gButtonGoogle, Google
Gui,2: Add, Button, x6 y90 w120 h20 gReload1,CLEAR
Gui,2: Add, Edit, x6 y20 w250 h20 vWord, autohotkey
Gui,2: Add, Text, x6 y0 w870 h20, Type in a word you're searching in Google.
;Gui,2: Add, Edit, x266 y20 w610 h490, PUT THE BROWSER HERE
Gui,2:show,x0 y0 h510 w900
Return
ButtonGoogle:
Gui,2:submit,nohide
AA=http://google.com/search?q=%Word%
COM_AtlAxWinInit()
;pwb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),top,left,width,height, "Shell.Explorer") ) ;left these here just for reference of the parameters
pwb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),269,20,610,490, "Shell.Explorer") )
COM_Invoke(pwb, "Navigate", AA)
Return
Reload1:
reload
return
2GuiClose:
Gui,2: Destroy
; COM_CoUninitialize()
; COM_AtlAxWinTerm()
ExitApp
just another example
;--------- saved at Donnerstag, 10. April 2008 10:36:26 --------------
MODIFIED = 20080406
FILENAME = EMBED_TEST
;--------- lbbrowse3.dll
;---------------------------------------------------
#NoEnv
#SingleInstance force
setworkingdir, %a_scriptdir%
ifnotexist,lbbrowse3.dll
goto,LBBROWSE3
transform,S,chr,32 ;space
transform,P,chr,37 ;procent
;--- video example --
;myvideo=http://www.youtube.com/watch?v=82ZuxWbO8QY
lbbHandle := DllCall("LoadLibrary", "str", "lbbrowse3.dll")
;-------- 4GUI ---------------------------------------------
WA=%A_screenwidth%
HA=%A_screenheight%
SW1 :=(WA*99.5)/100 ;width guishow width
SH1 :=(HA*95)/100 ;height
YB1 :=(SH1*96)/100 ;y-button last line
YB2 :=(SH1*90)/100
;-- position from picture -----
X1 :=(WA*2.5)/100
Y1 :=(HA*2.5)/100
WD :=(WA*94 )/100
HG :=(HA*80 )/100
;------------------------------
Gui,4:Color,000000
AA="Sylvia la torre" "sa kabukiran"
Gui,4:add,button,x10 y%YB1% h20 w100 gYTT1 ,VISAYAN
Gui,4:add,button,x120 y%YB1% h20 w100 gYTT2 ,DANSK
Gui,4:Add,Edit, x230 y%YB1% h20 w190 vWord1,%AA%
Gui,4:add,button,x430 y%YB1% h20 w100 gYTT3 ,GOOGLE
Gui,4:add,button,x550 y%YB1% h20 w100 gYTT4 ,CLEAR
Gui,4:Font,S16 cteal, Verdana
Gui,4:Add,Text,center x0 y%YB2% w%SW1% vAL1,
Gui,4: Show, x0 y0 h%SH1% w%SW1%,%Filename%
WinGet, mainGuiHandle, ID, A
AS2=about:blank
DLLCall("lbbrowse3\CreateBrowser","uint",mainGuiHandle,"Int",X1,"Int",Y1,"Int",WD,"Int",HG,"Str",AS2)
DllCall("lbbrowse3\ShowStatusbar","int",0)
OnExit, Cleanup
gosub,YTT1 ;test-1
Return
;--------------------------------------------
;-------- EXAMPLE-1 MAP Philippines -------------------------
YTT1:
M3 =%A_scriptdir%\EMBED_TEST.htm
ifexist,%M3%
filedelete,%M3%
AA4=<iframe width="%WD%" height="%HG%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&hl=en&geocode=&time=&date=&ttype=&q=carlota+philippines&sll=-20.492632,-54.600677&sspn=7.528597,10.283203&ie=UTF8&ll=11.043647,123.189697&spn=3.953887,5.141602&z=8&om=1&output=embed&s=AARTsJplSG2Od2sNI-gbn35QUXlu3D0lRQ"></iframe><small><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&time=&date=&ttype=&q=carlota+philippines&sll=-20.492632,-54.600677&sspn=7.528597,10.283203&ie=UTF8&ll=11.043647,123.189697&spn=3.953887,5.141602&z=8&om=1&source=embed" style="color:#0000FF;text-align:left"></a></small>
e1=
(
<HTML>
<HEAD>
<TITLE>MAPS</TITLE>
</HEAD>
<style type="text/css">
body {
background-color: #000000;
margin: 0px;
padding: 0px;
color: #fff;
overflow-y: hidden;
overflow-x: hidden;
}
</style>
<BODY>
%AA4%
</object>
</BODY>
</HTML>
)
Fileappend,%E1%`r`n,%M3%
X2 :=(X1)
Y2 :=(Y1)
W2 :=(WD)
H2 :=(HG)
GuiControl,4:Text,AL1,
DLLCall("lbbrowse3\MoveBrowser","Int",X2,"Int",Y2,"Int",W2,"Int",H2)
DllCall("lbbrowse3\Navigate", "str",M3)
return
;------------------- TEST-2 DANSK RADIO EVERGREEN ------------------
YTT2:
AX1=http://netradio.dr.dk/content.asp?station=29
X2 :=(10)
Y2 :=(10)
W2 :=(680)
H2 :=(290)
GuiControl,4:Text,AL1,Danmark Radio Evergreen
DLLCall("lbbrowse3\MoveBrowser","Int",X2,"Int",Y2,"Int",W2,"Int",H2)
DllCall("lbbrowse3\Navigate", "str",AX1)
return
;---------------------------------------------------------------------
YTT3:
Gui,4:submit,nohide
word1=%word1%
stringreplace,B1,word1,%S%,+,all
stringreplace,B2,B1,`",%P%22,all
URL3=http://google.com/search?q=%B2%
X3 :=(X1)
Y3 :=(Y1)
W3 :=(WD)
H3 :=(HG)
GuiControl,4:Text,AL1,
DLLCall("lbbrowse3\MoveBrowser","Int",X3,"Int",Y3,"Int",W3,"Int",H3)
DllCall("lbbrowse3\Navigate", "str",URL3)
return
/*
YTT3:
AX1=%MyVideo%
stringreplace,AX1,AX1,/watch?v=,/v/,all
X2 :=(330)
Y2 :=(190)
W2 :=(720)
H2 :=(600)
DLLCall("lbbrowse3\MoveBrowser","Int",X2,"Int",Y2,"Int",W2,"Int",H2)
DllCall("lbbrowse3\Navigate", "str",AX1)
GuiControl,4:Text,AL1,Flickan i Havanna-Evert Taube-Sverige
return
*/
YTT4:
AX1=about:blank
DllCall("lbbrowse3\Navigate", "str",AX1)
return
;---------- CLOSE -----------------------------------------------
cleanup:
4GuiClose:
Gui,4:Destroy
DllCall("lbbrowse3\DestroyBrowser")
DllCall("FreeLibrary", "UInt", lbbHandle)
ExitApp
;------------------------------------------------------------------------------------------------
;================= DOWNLOAD lbbrowse3.dll==========================================
LBBROWSE3:
{
text31=
(
Download
-lbbrowse3.dll
from
http://www.alycesrestaurant.com/lbbrowse.htm
Want you download this program ?
)
msgbox, 262180, Start URL,%text31%
ifmsgbox,NO
{
exitapp
return
}
else
{
;run,http://www.alycesrestaurant.com/lbbrowse.htm
run,http://www.alycesrestaurant.com/zips/browsdll3.zip
exitapp
return
}
}
;==================================================================