faraz 0 Posted October 8, 2010 Report Share Posted October 8, 2010 Hi,I am building a bot and I want the user to be able to choose which list should be worked upon. The steps are : User chooses listThen that list is used to create a loopwhere the bot navigates to each of the urls in the listand then scrapes it. I have got the scraping part correct.The part that I am not getting is how to get the user to choose the listand make the bot work with it. Faraz Quote Link to post Share on other sites
MiriamMB 63 Posted October 8, 2010 Report Share Posted October 8, 2010 One way you could do this is you could use a UI list box, and have random words that represent each list. cow=list 1tree=list2chicken=list3 Then use an if then else command: If>Evaluate>Value 1=CowThen > draw from list 1 If>Evaluate>Value 1=treeThen > draw from list 2 If>Evaluate>Value 1=chickenThen > draw from list 3 Quote Link to post Share on other sites
faraz 0 Posted October 8, 2010 Author Report Share Posted October 8, 2010 One way you could do this is you could use a UI list box, and have random words that represent each list. cow=list 1tree=list2chicken=list3 Then use an if then else command: If>Evaluate>Value 1=CowThen > draw from list 1 If>Evaluate>Value 1=treeThen > draw from list 2 If>Evaluate>Value 1=chickenThen > draw from list 3 Well, actually I meant something different.Maybe, I should have said a file.So, I want the user to be able to choose any file from his hard drive.Since the file is actually a list of links(or urls), that is why I said choosing a list.But now I think I should have said file. So, user chooses a file which contains a list of urls.and then bot chooses each item from that list to scrape data. How do I do that? Quote Link to post Share on other sites
UBotBuddy 331 Posted October 8, 2010 Report Share Posted October 8, 2010 Do as Lillt suggest filename1filename2filename3 The same logic applies. You can then apply a folder prefix and even append a filename extension to the selection. Quote Link to post Share on other sites
faraz 0 Posted October 8, 2010 Author Report Share Posted October 8, 2010 Do as Lillt suggest filename1filename2filename3 The same logic applies. You can then apply a folder prefix and even append a filename extension to the selection. Well, most probably I will be selling the bot and the problem is that I dont know, what are the different filenames in a person's hard drive.So, how can I choose only 3 filenames. Different persons can have various different filenames, and it is impossible for me to guess those names. Hope you understand. Quote Link to post Share on other sites
UBotBuddy 331 Posted October 8, 2010 Report Share Posted October 8, 2010 I would select generate a standard UI Selection 1Selection 2Selection 3 Then I would have the client create a file with the filenames in that list c:\data\filename1.txtd:\otherdata\filename2.txtc:\backup\filename3.txt I would then explain to the user that this is a one to one relationship that "Selection 1" would equate to c:\data\filename1.txt"Selection 2" would equate to d:\otherdata\filename2.txt"Selection 3" would equate to c:\backup\filename3.txt That is the way would approach until the ability to dynamically load the UI fields programmatically. I hope that helps. Quote Link to post Share on other sites
faraz 0 Posted October 11, 2010 Author Report Share Posted October 11, 2010 I would select generate a standard UI Selection 1Selection 2Selection 3 Then I would have the client create a file with the filenames in that list c:\data\filename1.txtd:\otherdata\filename2.txtc:\backup\filename3.txt I would then explain to the user that this is a one to one relationship that "Selection 1" would equate to c:\data\filename1.txt"Selection 2" would equate to d:\otherdata\filename2.txt"Selection 3" would equate to c:\backup\filename3.txt That is the way would approach until the ability to dynamically load the UI fields programmatically. I hope that helps. Ah, Thanks. This helped me indirectly. So, now I will just ask the client to create files that are being used by the botand to store those files in the folder, where the bot looks for the file. So, its okay now. Thanks,Faraz 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.