autohotkey - If/Else statement is not when trying to grab address list -


I am trying to run the if / else statement on the following URL:

and

My code is below:

 ; Results 1 sleep 1000 Addr1: = IE.document.getElementsByClassName ("name") [0]. WinnerHTML if substrate (Addr1, 1, 2) = "mk" {StringSplit, AddrNew, Addr1, `StringTrimLeft, AddrNew3, AddrNew3, 1 Ader 1: = Adrion New2", ". AddrNew3 ",". PostCode MsgBox,% Addr1%} if substrust (eder1, 1, 2) & lt; & Gt; "Mk" {stringsplit, adrion new, aper 1, string trimlift, adrion new2, adrenu2, 1 ader 1: = adren1 ",". AddrNew2 ",". PostCode MsgBox,% Addr1%}; Results 2 sleep 1000 Addr: = IE.document.getElementsByClassName ("name") [2]. WinnerHTML if Substr (Addr, 1, 2) = "mk" {StringSplit, AddrNew, Addr2, `StringTrimLeft, AddrNew3, AddrNew3, 1 edit: = Adren New2", ". AddrNew3 ",". PostCode MsgBox,% Addr%} Otherwise, if substrust (eder, 1, 2) & lt; & Gt; "Mk" {stringsplit, adrion new, aper 2, stringratellft, adrenu2, adrenu2, 1edit: = adren1 ",". AddrNew2 ",". PostCode MsgBox,% Addr%}  

Each time I try to grab data, the following happens:

Enter image details here

Enter image details here

Enter image details here

when the right output should be

  1. Mount Farm, Milton Keynes

  2. Saint Andrew Road, F. Burtingham Road, P

  3. Dawson Road, Mount Farm

Q. What is the problem with any idea? Explained it - I do not track the track of my ...

explained it - I do not keep track of my own ...

 < Code>; Results 1 Sleep 1000 Addr1: = IE.document.getElementsByClassName ("name") [0] .innertext String_Object: = StrSplit (addr1, "`, ") if (Substr (Addr1, 1, 2) =" MK ") { Addr1: = string_object [2] ",". Trim (string_object [3]) ",". PostCode MsgBox,% Addr1%} Other {Addr1: = String_Object [1] ",". Trim (string_object [2]) ",". PostCode MsgBox,% Addr1%}; Results 2 Sleep 1000 Addr2: IE.document.getElementsByClassName ("name") [1] .innertext String_Object: = StrSplit (addr2, "`, ") if (substrals (Addr2, 1, 2) =" MK ") { Addr2: = string_object [2] ",". Trim (string_object [3]) ",". PostCode MsgBox,% Addr2%} Other {Addr2: = String_Object [1] ",". Trim (string_object [2]) ",". PostCode MsgBox,% Addr2%}  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -