BigEfromDaBX 25 Posted April 24, 2018 Report Share Posted April 24, 2018 (edited) So I want to create a bot that goes through each of my pics on Instagram. Add the likers of my pics to a list (im guessing duplicates would have to be allow) and then count how many times each user shows up on that list. Then I will know who are my top likers Edited April 24, 2018 by BigEfromDaBX Quote Link to post Share on other sites
bestmacros 60 Posted April 24, 2018 Report Share Posted April 24, 2018 so what is your question exactly? what is the purpose of your post? Quote Link to post Share on other sites
BigEfromDaBX 25 Posted April 24, 2018 Author Report Share Posted April 24, 2018 i want to know which users are liking my pics the most. Let me make it more easy. Forget about IG Let says I have a list List 10 George1 Eddie2 Maria3 James4 Martin5 Eddie6 Greg7 Maria I want to be able to count the occurrences for each item in the list. For example: Eddie is in the list twice. Maria is in the list Twice. Everybody else is just in there 1 time. Make sense? 1 Quote Link to post Share on other sites
bestmacros 60 Posted April 24, 2018 Report Share Posted April 24, 2018 you need 2 loops one inside another - one loop will take items from the list and in the other loop you will count the instance appearance.you will need to remove the item from the list to prevent it from counting more than needed.something like: //loop 1for i less than total list items{//loop 2set j=i+1set counter 1for j less than total list items { if list item on position j is equal to list item on position i { increment counter remove item from the list decrement j } increment j } save counter for that item somewhere increment i} 1 Quote Link to post Share on other sites
BigEfromDaBX 25 Posted April 24, 2018 Author Report Share Posted April 24, 2018 Thanks I will take a look at it. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted April 26, 2018 Report Share Posted April 26, 2018 Here's another look at it fi you need it... clear list(%start list) comment("not deleting duplicates") add list to list(%start list,$list from text("ann ann robert jesse jesse jesse",$new line),"Don\'t Delete","Global") clear list(%keys) add list to list(%keys,%start list,"Delete","Global") clear list(%counted) loop($list total(%keys)) { set(#found items,$find regular expression(%start list,$next list item(%keys)),"Global") clear list(%item counter) comment("not deleting duplicates") add list to list(%item counter,$list from text(#found items,$new line),"Don\'t Delete","Global") comment("$list item returns only 1") add item to list(%counted,"{$list total(%item counter)},{$list item($list from text(#found items,$new line),0)}","Don\'t Delete","Global") } Regards,CDexample - count duplicates.ubot 1 Quote Link to post Share on other sites
BigEfromDaBX 25 Posted April 27, 2018 Author Report Share Posted April 27, 2018 I did it with two tables. 2nd table had 2 columns Went a little something like this: Imported names into TABLE ACreated a loop that Looped Table Total Rows of TABLE Athrough each rowif TABLE B contains name from TABLE A then grab total from from TABLE A row 2nd column and increment itelse insert the new name into TABLE B row on the first column and then 2nd column would be set to I did it with tables because my CSV had a few more thing i wanted to count which were in separate columns. 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.