| |
|
|
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. CompileMarkSeparationwindow 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? |
|
|
| |
|
|
|
| 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. |
|
|
| |
|
|
|
| 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
|
|
|
| |
|
|
|
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. |
|
|
| |
|
|