Jump to content
UBot Underground

Script Error Help


Recommended Posts

Hi Guys

 

Fairly new to UBS and getting a script error somewhere in 1 of the loops but can't understand why as I have both cycles controlled by the list totals.

Other times it doesn't give the script error & in debugger all the correct values are there but it still doesn't write them to the file.

Any help would be much appreciated.

 

 

 

ui block text("Target Keywords"#srcKeywords)
ui drop down("Google Location""http://google.com/ncr,http://google.com.au, http://google.co.uk"#srcEngine)
clear table(&srcRes)
ui button("Check Frontpage") {
    add list to list(%main$list from text(#srcKeywords$new line), "Delete""Global")
    set list position(%main, 0)
    set(#position, 0, "Global")
    navigate(#srcEngine"Wait")
    loop($list total(%main)) {
        if(#position > 0) {
            then {
                change attribute(<name="q">"value""")
            }
            else {
            }
        }
        type text(<name="q">$list item(%main#position), "Standard")
        click(<name="btnG">"Left Click""No")
        wait($rand(8, 35))
        set(#var$scrape attribute(<outerhtml=w"<cite>*</cite>">, "innertext"), "Global")
        clear list(%GoogleSERPs)
        set(#ytsrc, 0, "Global")
        set(#found, "No", "Global")
        add list to list(%GoogleSERPs, $list from text(#var, "
"), "Delete", "Global")
        loop($list total(%GoogleSERPs)) {
            if($contains($list item(%GoogleSERPs, #ytsrc), "youtube.com")) {
                then {
                    set(#found, "Yes", "Global")
                }
                else {
                }
            }
            increment(#ytsrc)
        }
        set table cell(&srcRes, #position, 0, $list item(%main, #position))
        set table cell(&srcRes, #position, 1, #found)
        increment(#position)
    }
}
save to file("C:\\Users\\Colin\\Documents\\Results.txt", &srcRes)

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...