vibra 1 Posted February 3, 2011 Report Share Posted February 3, 2011 I'm still trying to figure out how to use the While statement. Couldn't find any tutorial on it. Any help? Purpose:navigate to list itempull hrefadd to list navigate to next list itempull hrefadd to list navigate to next list item.pull hrefadd to list. I'm currently using the "Save to File" and everytime it saves, it clears the file instead of append. Quote Link to post Share on other sites
Enigma 78 Posted February 3, 2011 Report Share Posted February 3, 2011 While is the same as a loop.But with the difference that for While you set that it will loop as long as something remains True. Example: While => Search Page: Next >> This is something i use often myself.You have a code that you insert in While, and it keep looping that code for as long as "Next >>" is on the page.If the end of the pages is reached, the "Next >>" isn't visible anymore, thus the bot stops looping. There are various things you can use with While, even compare lists. If you have List A and List B. While $list total => List A < $list total => List B It keeps looping as long as the total items in List A are lower than the list total in List B. Just some small examples. 1 Quote Link to post Share on other sites
UBotBuddy 331 Posted February 3, 2011 Report Share Posted February 3, 2011 Enigma has some good examples there. I like to think of a While as a fancier and more elegant Loop. The Loop is dumb. The While has more Smarts to it. Quote Link to post Share on other sites
vibra 1 Posted February 3, 2011 Author Report Share Posted February 3, 2011 This is what i have so far. and it's not working well... am i missing a wait load somewhere? Quote Link to post Share on other sites
vibra 1 Posted February 3, 2011 Author Report Share Posted February 3, 2011 This is what i have so far. not working well. i believe my problem somewhere is transfering the variables to a list cause now nothing is showing in my list now... it keeps cycling. Quote Link to post Share on other sites
vibra 1 Posted February 3, 2011 Author Report Share Posted February 3, 2011 finally.... with your help. i got it. thanks. Quote Link to post Share on other sites
Frank 177 Posted February 3, 2011 Report Share Posted February 3, 2011 If you are married, it's something like this... While my wife wishes to shop -> -I'm stuck as she tries on every outfit in the mall -that is until she either 'gets tired' or 'kills the visa'.Then the loop is finished! Back to ubot! Quote Link to post Share on other sites
vibra 1 Posted February 3, 2011 Author Report Share Posted February 3, 2011 If you are married, it's something like this... While my wife wishes to shop -> -I'm stuck as she tries on every outfit in the mall -that is until she either 'gets tired' or 'kills the visa'.Then the loop is finished! Back to ubot! thanks frank. 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.