Jump to content
UBot Underground

[SOLVED] Loops within a CSV file


Recommended Posts

I can't seem to get the hang of this looping command when using it with a .csv file. Searched for tutorials, but got nothing past a simple loop bot, where you set the number of times you need it to loop.

 

Basically, the loop needs to go through a selection of rows in a .csv, input the data within each cell of that row, until it reaches the end, where there is no more data to be claimed. I have tried using the increment command within the loop for my particular cell (saved as a variable), but instead of incrementing by 1 cell, it actually increments the number IN THE CELL by 1. If the variable containing the cell is 508, then it will take it to 509, 510, etc, etc.

 

Here is the script:

 

clear table(&my table)
ui open file("CSV File", #csvfile)
create table from file(#csvfile, &my table)
set(#id, $table cell(&my table, 1, 1), "Global")
loop($table total rows(&my table)) {
   wait(2)
   navigate("https://graph.facebook.com/{#id}", "Wait")
   increment(#id)
   save to file("C:\\myfilelocation\\final.txt", $read file("https://graph.facebook.com/{#id}"))
}

Link to post
Share on other sites

proper setup

 

clear table(&my table)
ui open file("CSV File", #csvfile)
create table from file(#csvfile, &my table)
set(#row, 1, "Global")
loop($subtract($table total rows(&my table), 1)) {
   navigate("https://graph.facebook.com/{$table cell(&my table, #row, 1)}", "Wait")
   save to file("C:\\myfilelocation\\final.txt", $read file("https://graph.facebook.com/{#id}"))
   increment(#row)
}


  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...