dadalt95 Posted February 9, 2018 Share Posted February 9, 2018 Hello everyone! What I have (HTML CODE): My autoit code: Quote $sPhoneNumber = _StringBetween(_IEDocReadHTML($oIE) , '<SPAN style="FONT-WEIGHT: bold">Mensagem:</SPAN></TD></TR>', 'Linha') MsgBox(0,0, $sPhoneNumber[0]) FileWrite($hFilehandle, $sPhoneNumber[0]) What I get (message and file): What I want: The main question here is how do I put End Of Line in _StringBetween? Thanks in advance! Link to comment Share on other sites More sharing options...
Subz Posted February 9, 2018 Share Posted February 9, 2018 Have you taken into account @CR and @LF of the form? You may need to do a StringReplace or StringRegExReplace of the InnerHTML first before using _StringBetween alternatively you could also use something like: #include <IE.au3> $oiE = _IECreate("http://somesite.com", 1) $oTRS = _IETagNameGetCollection($oiE, "tr") For $oTR in $oTRS If $oTR.InnerText = "Mensagem: " Then MsgBox(0,'', "InnerHTML = " & $oTR.nextElementSibling.innerHTML) MsgBox(0,'', "InnerText = " & $oTR.nextElementSibling.innerText) EndIf Next dadalt95 1 Link to comment Share on other sites More sharing options...
dadalt95 Posted February 9, 2018 Author Share Posted February 9, 2018 10 hours ago, Subz said: Have you taken into account @CR and @LF of the form? You may need to do a StringReplace or StringRegExReplace of the InnerHTML first before using _StringBetween alternatively you could also use something like: #include <IE.au3> $oiE = _IECreate("http://somesite.com", 1) $oTRS = _IETagNameGetCollection($oiE, "tr") For $oTR in $oTRS If $oTR.InnerText = "Mensagem: " Then MsgBox(0,'', "InnerHTML = " & $oTR.nextElementSibling.innerHTML) MsgBox(0,'', "InnerText = " & $oTR.nextElementSibling.innerText) EndIf Next Thanks!!! The @CRLF worked great. It was a very newbie question! 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