HarryPotter 9 Posted December 23, 2010 Report Share Posted December 23, 2010 hey guys, here is the scenario. i have list 1, which is a list that is already processed. then i have list 2, a totally separate list that needs to be compared against. IF any lines in list 2 are also in list 1, then delete it from list 2. the remainder of list 2 will be then processed with the bot. is there a function in ubot that does this? thank you!!! Quote Link to post Share on other sites
UBotBuddy 331 Posted December 23, 2010 Report Share Posted December 23, 2010 Two commands come to mind. "$common list items" and "$subtract lists" You will find them in the Variable Constants. Quote Link to post Share on other sites
iglow 8 Posted December 23, 2010 Report Share Posted December 23, 2010 if somebody is not lazy as me and makes ubot file and attach it here for editing would be sweet ;p Quote Link to post Share on other sites
HarryPotter 9 Posted December 23, 2010 Author Report Share Posted December 23, 2010 working like a charm, thanks! tip, just make sure to put the prescreen list in list 1, then the list to check against in list 2 when using SUBTRACT even if you mix it up though, it's easy to figure out with a save to file and stop script 1 Quote Link to post Share on other sites
TI-35 SLR 1 Posted January 4, 2012 Report Share Posted January 4, 2012 Has something changed on this command? I have been trying to get it working for 2 hrs on two simple lists and it just adds the two list together. I followed it just as the tutorial in the help menu. What am I doing wrong? Below is my simple robot to test the command. Thanks in advance add item to list(%test1, $list from text("apple, pear, banana", ","), "Delete", "Global") add item to list(%test2, $list from text("banana, car", ","), "Delete", "Global") save to file("C:\\Documents and Settings\\Chris\\My Documents\\ubot\\Projects\\Contests\\win-free-stuff-ca\\test1.txt", $common list items(%test2, %test1)) Chris 1 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.