Loop index is not including a return Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Georgie Munteer

Loop index is not including a return

Post by Georgie Munteer » 18 Nov 2017, 20:39

loop, 3
golfc .= pwb.document.getElementsByClassName("itemgo")[ A_index -1 ].innerText
msgbox, % golfc

The msgbox returns with all text at once with no space between them or new line (need new line)

I tried % golfc`n and all methods like `r`n I tried everything it seems :-(
Georgie Munteer

Re: Loop index is not including a return

Post by Georgie Munteer » 18 Nov 2017, 21:06

Georgie Munteer wrote:loop, 3
golfc .= pwb.document.getElementsByClassName("itemgo")[ A_index -1 ].innerText
msgbox, % golfc

The msgbox returns with all text at once with no space between them or new line (need new line)

I tried % golfc`n and all methods like `r`n I tried everything it seems :-(
figured it out, needed to add the info after .InnerText "`n"
User avatar
Spawnova
Posts: 339
Joined: 08 Jul 2015, 00:12
Contact:

Re: Loop index is not including a return  Topic is solved

Post by Spawnova » 18 Nov 2017, 21:10

Code: Select all

loop, 3
    golfc .= pwb.document.getElementsByClassName("itemgo")[ A_index -1 ].innerText "`n"  ;when using := or .=  string must be enclosed in quotations
msgbox, % golfc
Georgie Munteer

Re: Loop index is not including a return

Post by Georgie Munteer » 19 Nov 2017, 02:33

Spawnova wrote:

Code: Select all

loop, 3
    golfc .= pwb.document.getElementsByClassName("itemgo")[ A_index -1 ].innerText "`n"  ;when using := or .=  string must be enclosed in quotations
msgbox, % golfc
:thumbup: thank you
Post Reply

Return to “Ask For Help”