Vic 0 Posted February 22, 2013 Report Share Posted February 22, 2013 I am trying to create my first bot. I am looking to scrape google for keyword and store the results in a list. I saw the tutorials and this part works fine. I now want to click on one of the links - say for example the list item #7. It seems that I tried the click, I tried load html and I tried navigate commands with various permutations and combinations - but nothing worked. My code is as follows: clear cookiesset referrer("http://www.google.de")set user agent("Chrome")navigate("http://www.google.com", "Wait")wait($rand(4, 10))type text(<name="q">, "dog training", "Standard")wait($rand(2, 8))click(<name="btnK">, "Left Click", "No")wait(4)clear list(%list search urls)add list to list(%list search urls, $scrape attribute(<class="l">, "fullhref"), "Don\'t Delete", "Global") Does anybody know what command to use for clicking, for example the number 7 URL on the Google search page? Quote Link to post Share on other sites
bestmacros 60 Posted February 22, 2013 Report Share Posted February 22, 2013 use element offset inside click to set position of the link you want to click Quote Link to post Share on other sites
k1lv9h 76 Posted February 22, 2013 Report Share Posted February 22, 2013 Hi, Sample code: set(#clickonlistitemnumber, 6, "Global") set(#clickonthisitem, $list item(%list search urls, #clickonlistitemnumber), "Global") click(<href=#clickonthisitem>, "Left Click", "No")or set(#clickonlistitemnumber, 6, "Global") click(<href=$list item(%list search urls, #clickonlistitemnumber)>, "Left Click", "No")Ubot Studio lists tip. Ubot Studio lists start at 0. List Item 6 is the 7th URL on page. Thanks,Kevin ps. You may have Ubot Studio forum restrictions in place. This Ubot Studio forum topic has what you need to do to have the restrictions lifted. http://www.ubotstudio.com/forum/index.php?/topic/7731-getting-errors-posting/ 1 Quote Link to post Share on other sites
Vic 0 Posted February 22, 2013 Author Report Share Posted February 22, 2013 Thanks both @bestmacros and @k1lv9h - I will try your suggestions. @K1v9h - As I am new to ubot perhaps I am restricted. I will follow your link to get it removed. Thanks again. Quote Link to post Share on other sites
JackCrow 4 Posted March 16, 2013 Report Share Posted March 16, 2013 I am also having the same issue clicking on a link that's the result of a Google search. I used inside click but it never goes to the page. Any updates or suggestions? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.