Lmac34 Posted July 2, 2008 Share Posted July 2, 2008 (edited) Anyone Out there know a quick and easy way to extract all '<a href="http://.*" title' from the Result of _IEDocReadHTML ($oIE) example code dose not Work need help with StringRegExp local $amt = _GUICtrlListBox_GetListBoxInfo($lstPages) local $index = 0 while $index < $amt local $webpage = _GUICtrlListBox_GetText($lstPages, $index) $oIE = _IECreate ($webpage,0,0,1,1) $sHTML = _IEDocReadHTML ($oIE) _IEQuit ($oIE) local $regExp = '(?i<a href=\"http\://.*\"\stitle)*' local $ArrayofMatchs = StringRegExp ($sHTML,$regExp,1) _ArrayDisplay($ArrayofMatchs,"Test") $index = $index + 1 WEnd any help would be much appreciated. regards lmac34 Edited July 2, 2008 by Lmac34 Link to comment Share on other sites More sharing options...
ProgAndy Posted July 2, 2008 Share Posted July 2, 2008 Just try _IELinkGetCollection($oIE): #include <IE.au3> $oIE = _IECreate("autoitscript.com") $links = _IELinkGetCollection($oIE) For $link In $links $URL = $link.href $name = $link.innerHTML ConsoleWrite($URL & " - " & $name & @CRLF) Next *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Lmac34 Posted July 2, 2008 Author Share Posted July 2, 2008 Just try _IELinkGetCollection($oIE): #include <IE.au3> $oIE = _IECreate("autoitscript.com") $links = _IELinkGetCollection($oIE) For $link In $links $URL = $link.href $name = $link.innerHTML ConsoleWrite($URL & " - " & $name & @CRLF) Next That Will work Perfectly Thanks Very Much. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now