JohnnyVegas 2 Posted June 28, 2012 Report Share Posted June 28, 2012 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}")) } Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted June 28, 2012 Report Share Posted June 28, 2012 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) } 1 Quote Link to post Share on other sites
JohnnyVegas 2 Posted June 28, 2012 Author Report Share Posted June 28, 2012 Your a Saint! Thanks again X3! 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.