English
Forum

OCX HTML View source

 

Georg
Hovenbitzer
Hello together,
I need eure Help one OCX trouble.
gives it a Possibility The URL one Bildes from the View source of/ one Website auszulesen?
Folgender code reads me The Page ID and the Page cover (Headline Forumsbeitrag) from.
CompileMarkSeparation
window 780,400
 $H Windows.ph
 $H ocx3a.ph
 $I ocx3a.inc
Declare Element&
Declare Text$
Declare Inhalt$
Declare PageID$
Declare PosID&
Declare PageTitel$
Declare WebControl&
ocxInit()
var File$="Test.htm"
var WebObject&=ocxCreate(File$,0,0,0,0,0,0,addr(WebControl&))
var Document&=ocxGet(WebObject&,"Document")
var Collection&=ocxGet(Document&,"links")

WhileLoop 0,ocxGet(Collection&,"length")-1

    Element&=ocxMethod(Collection&,"item",&loop,0)

    If PageID$ = ""

        Text$ = Trim$(ocxGet(Element&,"id"))

        If Text$ = "skipToContent"

            Inhalt$ = ocxGet(Element&,"href")
            PosID& = InStr("threadID", Inhalt$)
            PageID$ = Mid$(Inhalt$,(PosID& + 9),(Len(Inhalt$) - (PosID& + 9)))
            Text$ = ""

        EndIf

    EndIf

    If (PageID$ <> "") And (PageTitel$ = "")

        Text$ = ocxGet(Element&,"href")

        If Right$(Text$,Len("Thread&threadID=" + PageID$)) = "Thread&threadID=" + PageID$

            PageTitel$ = ocxGet(Element&,"innerText")

        EndIf

    EndIf

    ocxRelease(Element&)

EndWhile

Print PageID$
Print PageTitel$
sleep 1000
WaitInput
DestroyWindow(WebControl&)
ocxDeInit()
f='./../../function-references/XProfan/end/'>End

even if I me any Entries The I under 'links' abrufen can ansehe, is the URL the Bildes not thereby, weder in the element id, name, innerText or href.

can me hierbei someone help?
gives it a half-way well understandable guide To OCX?

greetings
Georg
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
05/28/13  
 



Image? Should still SRC his, already thereafter geschaut?
 
05/29/13  
 



Hilf me time Please,

by me crashes it ex - vlt. can time your HTML and the Inc into pkg pack.

fundamentally must hold The IMGs enumerieren and the having the src-Attribut.
 
05/31/13  
 



Have pkg by PN receive and what found!

so works: (only geänderter area)
CompileMarkSeparation
...
ocxInit()
var File$="file:///c:/dev/p/Test5.htm"
var WebControl&=create("htmlwin",%hwnd,file$,0,0,0,400,400)

while HTMLWin("GetBusy", WebControl&)

    sleep 200

endwhile

var WebObject&=HTMLWin("QueryInterface",WebControl&)
'var WebObject&=ocxCreate(File$,0,0,0,0,0,0,addr(WebControl&))
var Document&=ocxGet(WebObject&,"Document")
var Collection&=ocxGet(Document&,"images")

WhileLoop 0,ocxGet(Collection&,"length")-1

    Element&=ocxMethod(Collection&,"item",&loop,0)
    Text$ = Trim$(ocxGet(Element&,"src"))
    print text$
    continue
 
06/01/13  
 




Georg
Hovenbitzer
super iF,
it works - what there everything read can!
have you got somewhere a Doku found which Keywords one bring into action can and which combination?
with 'image' functions id, title, old, width, height and src.
difficult is of these Information the Hauptbild (af2iofrr.jpg) to find and the whole Avatare, Icons etc. To verwerfen.

greetings
Georg
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
06/02/13  
 



there's hold the "document"-Objekt and there's document.images,
The Image-Collection The here angezapft becomes.

Unterobjekte:

node
all
anchors
applets
forms
images
layers
left

Related: [...] 

here Images: [...] 

Perhaps can You The from you desired Images anhand of
ocxGet(Element&,"width") discern.
 
06/02/13  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.205 Views

Untitledvor 0 min.
H.Brill11/25/23
Sven Bader02/22/21
Thomas Freier07/17/18
Christof Neuß04/01/18
More...

Themeninformationen

this Topic has 2 subscriber:

iF (4x)
Georg Hovenbitzer (2x)


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