English
Forum

Webcontrol read ?

 

Andreas
Gaida
Hi!
wisely Perhaps someone How one whom Content one such Webcontrols read can.
Should a IP address from it read. with the mouse can Yes everything Mark and copy.but me are missing The
suitable Messages circa it automatically To make.If someone The knows ,true I for tappt im dunkeln very grateful.
CompileMarkSeparation
WebControl&=create(HTMLWin,%hwnd,http://fritz.box/,0,0,0,width(%hwnd),height(%hwnd))
>

MfG
Andreas
 
Athlon X2 4800 , 2GB Ram , GeForce 7800GT
Windows XP Pro , XProfan 10 und 11 , Profan2Cpp 1.6b
01/18/08  
 




Rolf
Koch
On these manner GEHTS not at all. look time here:
[web]https://XProfan.com/thread.core?t=3162&highlight=stringtoguid[/web]
 
01/18/08  
 




Andreas
Gaida
thanks but the Examples show whom Source the Page on. I need only The display the spent Texts
and this is manually with the mouse machbar (Mark and the clipboard copy)only unfortunately wisely I do not How the automatically goes.
 
Athlon X2 4800 , 2GB Ram , GeForce 7800GT
Windows XP Pro , XProfan 10 und 11 , Profan2Cpp 1.6b
01/18/08  
 



Andreas No from pfui! Nimm The Download-Include - so or so become You but whom HTML parsen must around the from you desired contents herauszufischen! (nagut, xml parsen become net must circa ne IP rauszufischen, here go vlt. substrs wealthy)

your WAN-IP gives you The download-inc too by dw.ip() as String back - for drop the it you therefore goes...
 
01/18/08  
 




Uwe
''Pascal''
Niemeier
Hello people!

here a Variante to display the visible Textes of/ one Website:
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 CallMethod--------------------------Methode eines COM-Interfaces aufrufen

        parameters IFace&,Method&
        declare VTable&
        VTable&=long(IFace&,0)
        Method&=long(VTable&,Method&*4)
        case %pcount=2:return call( Method&,IFace& )
        case %pcount=3:return call( Method&,IFace&,&(3) )
        case %pcount=4:return call( Method&,IFace&,&(3),$(4) )
        case %pcount=5:return call( Method&,IFace&,&(3),&(4),&(5) )
        endproc-----------------------------------------------------------------------

        proc TextAuslesen-------------------------------------sichtbaren Text Auslesen

            parameters WebCtrl&
            declare IID#
            dim IID#,16
            external(ole32,CoInitialize,0)
            declare IUnknown&
            external(atl,AtlAxGetControl,WebCtrl&,addr(IUnknown&))
            declare IWebBrowser&
            StringToGUID({D30C1661-CDAF-11d0-8A3E-00C04FC9E26E},IID#)--IID_IWebBrowser2
            CallMethod(IUnknown&,0,IID#,addr(IWebBrowser&))-------IUnknown::QueryInterface
            declare Status&

            while 1

                sleep 300
                CallMethod(IWebBrowser&,31,addr(Status&))--IWebBrowser&::get_Busy
                casenot Status&:break

            endwhile

            declare IHTMLDocument2&
            CallMethod(IWebbrowser&,18,addr(IHTMLDocument2&))--IWebbrowser::get_Document
            declare IHTMLElement&
            CallMethod(IHTMLDocument2&,9,addr(IHTMLElement&))--IHTMLDocument2::get_body
            declare Text&
            CallMethod(IHTMLElement&,64,addr(Text&))--IHTMLElement::get_outerText
            declare Size&,Text#,Text$
            Size&=external(oleaut32,SysStringLen,Text&)
            dim Text#,Size&
            ~WideCharToMultiByte(0,0,Text&,-1,Text#,Size&,0,0)
            external(oleaut32,SysFreeString,Text&)
            Text$=string$(Text#,0)
            CallMethod(IHTMLElement&,2)----IHTMLElement::Release
            CallMethod(IHTMLDocument2&,2)--IHTMLElement::Release
            dispose Text#
            dispose IID#
            external(ole32,CoUninitialize)
            return Text$
            endproc-----------------------------------------------------------------------
            window 0,0-800,600
            usermessages 16
            def AtlAxWinInit(0) !atl.dll,AtlAxWinInit
            def AtlAxCreateControl(4) !atl.dll,AtlAxCreateControl
            declare Atl&,Web&,a$
            Atl&=usedll(atl.dll)
            AtlAxWinInit()
            a$=C:Test.html-----------Pfad oder URL
            Web&=control(AtlAxWin,a$,$50300000,0,0,780,250,%hwnd,0,0,$200)-HTML-Contol anlegen
            a$=TextAuslesen(Web&)
            create(Multiedit,%hwnd,a$,0,290,780,250)----Text anzeigen

            while 1

                waitinput
                case %umessage=16:break

            endwhile

            destroywindow(Web&)
         
class=s4 href='./../../function-references/XProfan/freedll/'>freedll Atl&

Eleganter GEHTS with usage of my ocx2-routines [...] :
CompileMarkSeparation
windowstyle 16+8+4+2+1
window 1,1-(%maxX-1),(%maxY-1)
 $H Messages.ph
 $H windows.ph
 $H ocx2.ph
 $I ocx2.inc
def Redraw(1) ~RedrawWindow(&(1),0,0,$485)
usermessages 16----terminate
ocxInit()
declare Pos#,Url$,WebControl&
dim Pos#,16
~GetClientRect(%hwnd,Pos#)
var WebObject&=ocxCreate(about:levelly,%hwnd,0,0,long(Pos#,8),long(Pos#,12)/2,$53b00000,addr(WebControl&))
var Edit&=create(multiedit,%hwnd,,0,long(Pos#,12)/2,long(Pos#,8),long(Pos#,12)/2)
appendmenubar 101,back
appendmenubar 102,along
appendmenubar 103,Cancel
appendmenubar 104,update
appendmenubar 105,Startseite
appendmenubar 106,Search
appendmenubar 107,File öffnen
appendmenubar 108,URL öffnen
appendmenubar 109,Text Show
appendmenubar 110,View source Show
ocxMethod(WebObject&,GoHome)--Startseite öffnen
--with want: informations the WebBrowsers suppress (in example Scriptfehler or Offline)
ocxPut(WebObject&,Silent,$FFFF)

proc piloting-------------------------------------------

    parameters fashion$
    var Document&=ocxGet(WebObject&,Document)
    var Window&=ocxGet(Document&,parentWindow)
    var History&=ocxGet(Window&,History)
    ocxMethod(History&,fashion$)
    ocxRelease(History&,Window&,Document&)
    endproc---------------------------------------------------

    proc TextAnzeigen-----------------------------------------

        parameters fashion$
        var Document&=ocxGet(WebObject&,Document)
        var Body&=ocxGet(Document&,body)
        var Text$=ocxGet(Body&,fashion$)
        ocxRelease(Body&,Document&)
        settext Edit&,Text$
        endproc---------------------------------------------------

        while 1

            if menuitem(101)---------------------------------------back

                piloting(back)
                ocxMethod(WebObject&,goback) > Error with Unterlauf

            elseif menuitem(102)-----------------------------------along

                piloting(forward)
                ocxMethod(WebObject&,goforward) > Error with Überlauf

            elseif menuitem(103)-----------------------------------Cancel

                ocxMethod(WebObject&,Stop)

            elseif menuitem(104)-----------------------------------update

                ocxMethod(WebObject&,Refresh)

            elseif menuitem(105)-----------------------------------Startseite

                ocxMethod(WebObject&,GoHome)

            elseif menuitem(106)-----------------------------------Search

                ocxMethod(WebObject&,GoSearch)

            elseif menuitem(107)-----------------------------------File öffnen

                Url$=loadfile$(Please Image or HTML-File dial,*.*)
                Redraw(WebControl&)--Repaint wg. Dialogbox with discontinue
                case len(Url$):ocxMethod(WebObject&,Navigate,*+Url$)

            elseif menuitem(108)-----------------------------------URL öffnen

                Url$=input$(Please Web-address prompt:,URL:,http://www.Date.de)
                Redraw(WebControl&)--Repaint wg. Dialogbox with discontinue
                case len(Url$):ocxMethod(WebObject&,Navigate,*+Url$)

            elseif menuitem(109)-----------------------------------Text Show

                TextAnzeigen(outerText)

            elseif menuitem(110)-----------------------------------View source Show

                TextAnzeigen(outerHTML)
                endif------------------------------------------------------------

                while 1-------------------------Waiting, To action carryed out is

                    casenot ocxGet(WebObject&,Busy):break
                    sleep 200
                    endwhile---------------------------------------------------------
                    ~GetClientRect(%hwnd,Pos#)--Repositionieren wg. Scrolleisten with Grössenänderung
                    setwindowpos WebControl&=0,0-long(Pos#,8),long(Pos#,12)/2
                    setwindowpos Edit&=0,long(Pos#,12)/2-long(Pos#,8),long(Pos#,12)/2
                    Redraw(WebControl&)--Repaint
                    waitinput
                    case %umessage=16:break--end
                    endwhile---------------------------------------------end Eingabeschleife
                    dispose Pos#
                    destroywindow(WebControl&)
                    ocxDeInit()

in the Zweifelsfall can so too single items the Website inquire, if itself these somehow isolieren let, z.B. duch a intene ID.
Inwiefern the with the FritzBox useable is, white I but (yet) not...

HTH
Pascal
 
01/19/08  
 




RGH
One small Tipp:

the ~GetClientRect() can itself save.
XProfan knows for a long time The functions Width(hWin&) / Height(hWin&), with them the Ausmaße the Clientbrereiches the Fensters hWin& detect let.
(clear: These functions call naturally too The API GetClientRect() on ...)

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
01/19/08  
 




Andreas
Gaida
thanks you all for Help.
but The Solutions are me To Komplex.
me would really suffice if I whom Text Mark could and it into Zwieschenablage copies get.
there this vorgehen too manually with the mouse goes ought to it too commands give The the automatically manage. How wm_Copy, wm_Paste what me missing is the Message for everything Mark.

M fG

Andreas
 
Athlon X2 4800 , 2GB Ram , GeForce 7800GT
Windows XP Pro , XProfan 10 und 11 , Profan2Cpp 1.6b
01/19/08  
 




Uwe
''Pascal''
Niemeier
Hello people!

@ Roland: is correct, the GetClientRect() must time with irgendwelchen try spare stayed his

@ Andreas:


there this vorgehen too manually with the mouse goes ought to it too commands give The the automatically manage. How wm_Copy, wm_Paste


even not
Something like can itself in the Webbrowser too only by COM release, unless, You would mouse/Cursor fernsteuern. with einfachen Messages is there nothing To make.

HTH
Pascal
 
01/19/08  
 




Frank
Abbing
You could it with of/ one combination from whom API SetCursorPos() and mouse_event() try. the simulate Mausbewegungen- and knopfdrücke.
 
01/19/08  
 




RudiB.
I have time whom oberen (first) Source aufbereitet, bring me but a Error Message. what runs there schief ?
Seitenaufruf=Google-Translate and Deutscher concept is with transfer when calling.

"https://translate.google.com/?hl=de&sl=de&tl=it&text=hummel&op=translate"

i want on the Page solely The Translation the Wortes read.


 $H windows.ph

proc StringToGUID'---------------conversion 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 CallMethod'--------------------------method one COM-Interfaces Call

    parameters IFace&,Method&
    declare VTable&
    VTable&=long(IFace&,0)
    Method&=long(VTable&,Method&*4)
    case %pcount=2:return call( Method&,IFace& )
    case %pcount=3:return call( Method&,IFace&,&(3) )
    case %pcount=4:return call( Method&,IFace&,&(3),$(4) )
    case %pcount=5:return call( Method&,IFace&,&(3),&(4),&(5) )

ENDPROC'-----------------------------------------------------------------------

proc TextAuslesen'-------------------------------------visible Text Reading

    parameters WebCtrl&
    declare IID#
    dim IID#,16
    external("ole32","CoInitialize",0)
    declare IUnknown&
    external("atl","AtlAxGetControl",WebCtrl&,addr(IUnknown&))
    declare IWebBrowser&
    StringToGUID("{D30C1661-CDAF-11d0-8A3E-00C04FC9E26E}",IID#)'--IID_IWebBrowser2
    CallMethod(IUnknown&,0,IID#,addr(IWebBrowser&))'-------IUnknown::QueryInterface
    declare Status&

    while 1

        sleep 300
        CallMethod(IWebBrowser&,31,addr(Status&))'--IWebBrowser&::get_Busy
        casenot Status&:break

    endwhile

    declare IHTMLDocument2&
    CallMethod(IWebbrowser&,18,addr(IHTMLDocument2&))'--IWebbrowser::get_Document
    declare IHTMLElement&
    CallMethod(IHTMLDocument2&,9,addr(IHTMLElement&))'--IHTMLDocument2::get_body
    declare Text&
    CallMethod(IHTMLElement&,64,addr(Text&))'--IHTMLElement::get_outerText
    declare Size&,Text#,Text$
    Size&=external("oleaut32","SysStringLen",Text&)
    dim Text#,Size&
    ~WideCharToMultiByte(0,0,Text&,-1,Text#,Size&,0,0)
    external("oleaut32","SysFreeString",Text&)
    Text$=string $(Text#,0)
    CallMethod(IHTMLElement&,2)'----IHTMLElement::Release
    CallMethod(IHTMLDocument2&,2)'--IHTMLElement::Release
    dispose Text#
    dispose IID#
    external("ole32","CoUninitialize")
    return Text$

ENDPROC'-----------------------------------------------------------------------

window 0,0-800,600
usermessages 16
def AtlAxWinInit(0) !"atl.dll","AtlAxWinInit"
def AtlAxCreateControl(4) !"atl.dll","AtlAxCreateControl"
declare Atl&,Web&,a$,ME&
Atl&=usedll("atl.dll")
AtlAxWinInit()
a$="https://translate.google.com/?hl=de&sl=de&tl=it&text=hummel&op=translate"'-----------way or URL
Web&=control("AtlAxWin",a$,$50300000,0,0,780,250,%hwnd,0,0,$200)'-HTML-Contol lay out
a$=TextAuslesen(Web&)
ME&=create("Multiedit",%hwnd,a$,0,290,780,250)'----Text Show

while 1

    waitinput
    case %umessage=16:break

endwhile

destroywindow(Web&)
freedll Atl&

21 kB
Hochgeladen:08/15/21
Downloadcounter62
Download
 
XProfan X4
Xprofan X4
Rudolf Beske / München

Hardware: NB Intel I9 - 16GByte RAM
08/15/21  
 




RudiB.
...yet as Nachtrag...The Website becomes complete displayed, then comes The Error Message...
 
XProfan X4
Xprofan X4
Rudolf Beske / München

Hardware: NB Intel I9 - 16GByte RAM
08/15/21  
 




Georg
Teles
Hi, in the proc CallMethod is a Error:

there standing one $ instead of & at Parameter Nr 4
case %pcount=4:return call( Method&,IFace&,&(3),$(4) )

Korrigiert works it by me at Erststart comes The nervige Cookies Message

Regards
 
XProfan X2
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

08/20/21  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

10.830 Views

Untitledvor 0 min.
Uwe Lang06/28/24
H.Brill06/07/24
Sven Bader11/21/23
Ernst05/29/22
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie