| |
|
|
| again one Fundstück of Andreas leasing - this time around the actually address/ URL one HTMLWin-Controls auszulesen:
Andreas Miethe, URL=paules-pc-forum.de/forum/XProfan/127403-address-from-htmlwin-read-2.html#mail780106, ZEITPUNKT=10.04.2010, 11:19
Versuchs time herewith. is one something abgewandelter Code Uwe "Pascal" Niemeier. CompileMarkSeparation $H Windows.ph
proc StringToGUID'---------------Umwandlung String > globally unique identifier
parameters GUID$,GUID&
declare Temp$
Temp$=space$(80)
~MultiByteToWideChar(1,1,addr(GUID$),-1,addr(Temp$),80)
external("ole32","CLSIDFromString",addr(Temp$),GUID&)
endproc'-----------------------------------------------------------------------
proc WideToMultiOLE'------------------------------WideChar to MultiByte für OLE
parameters Text&
declare Size&,Text$
Size&=external("oleaut32","SysStringLen",Text&)
Text$=char$(Text&,0,Size&*2)
Text$=substr$(Text$,1,"zz")
Text$=translate$(Text$,"z","")
external("oleaut32","SysFreeString",Text&)
return Text$
endproc'-----------------------------------------------------------------------
proc WebInfo'------------------------------------------------------------------
parameters WebCtrl&,Method%
declare IID#,IUnknown&,IWebBrowser&,VTable&
declare Text$,Text&
dim IID#,16
external("atl","AtlAxGetControl",WebCtrl&,addr(IUnknown&))
StringToGUID("{D30C1661-CDAF-11d0-8A3E-00C04FC9E26E}",IID#)'--IID von IWebBrowser2
VTable&=long(IUnknown&,0)'------------------------------------IVTable von IUnknown
Call(long(VTable&,0),IUnknown&,IID#,addr(IWebBrowser&))'------IUnknown::QueryInterface
Call(long(VTable&,8),IUnknown&)'------------------------------IUnknown::Release
VTable&=long(IWebBrowser&,0)'---------------------------------IVTable von IWebBrowser2
call(long(VTable&,Method%*4),IWebBrowser&,addr(Text&))
Text$=WideToMultiOLE(Text&)
Call(long(VTable&,8),IWebBrowser&)'---------------------------IWebBrowser2::Release
dispose IID#
return Text$
endproc'-----------------------------------------------------------------------
window 0,0-800,600
Var ende& = 0
Var URL$="https://www.ampsoft.eu"'-----------Pfad oder URL
Var Web&=create("HTMLWin",%hwnd,url$,0,0,0,800,600)
whilenot ende&
Waitinput 100
WindowTitle WebInfo(Web&,30)'----IWebBrowser2::get_LocationURL
EndWhile
destroywindow(Web&)
f='./../../Function-References/XProfan/end/'>End
so against You can then with a couple einfachen Handgriffen a einfachen Web-Browser produce:
Download
calls one WebInfo with worth 29 as 2. Parameter on then sustain one apparently sometimes even whom Seitentitel - unfortunately but not always what about me have no idea why. The URL against shining reliably ermittelbar. |
|
|
| |
|
|