Jump to content
UBot Underground

list_from_text ?


Recommended Posts

What I'm trying to do is pull in a delimited file so I'm using the list_from_text command. This is working but it is creating a 1 dimensional list. How would I split this out.  What I want to do is have a csv file with multiple columns, then use those columns for in different lists. Any ideas?

 

Thanks!

Link to post
Share on other sites

turbolapp, I think we are on different pages. I understand how to save multiple lists as a csv. What i'm looking to do is input a csv with multiple columns to multiple lists.  So from one file I want to populate listA and listB so I can input them into different parts of the website I'm working with.

Link to post
Share on other sites

Select a node.

 

right click, under variables choose add to list

 

give the list a name.  under enter a value, give it a sub value (insert list from file/text)

 

this will popup a new box.  Enter text this is your variable of your filename, and under delimiter, you can choose | or , or whatever.  If it is newline (\n) then right click on a sub and choose $new line from the context menu.

 

hth

Link to post
Share on other sites
Guest luminus

Seth and I discussed this and he recommends the following:

 

$list item($list from text($list item($list from file("my file.csv"), 12),","), 4)

 

It would definitely help to get a copy of a few lines of the file you're working with so that we can see if perhaps there's a simpler solution.

Link to post
Share on other sites

Seth and I discussed this and he recommends the following:

 

$list item($list from text($list item($list from file("my file.csv"), 12),","), 4)

 

It would definitely help to get a copy of a few lines of the file you're working with so that we can see if perhaps there's a simpler solution.

 

I will give this a go. The file will be pretty simple.  I created it in excel, a copy is attached. I can see me using this further down the road so the file might change a little.

 

Thanks for the help.

 

Link to post
Share on other sites
Guest jackfitz

Seth and I discussed this and he recommends the following:

 

$list item($list from text($list item($list from file("my file.csv"), 12),","), 4)

 

It would definitely help to get a copy of a few lines of the file you're working with so that we can see if perhaps there's a simpler solution.

 

I have been trying to do this exact same thing. this is as far as I could get :(

Any suggestions?

 

The CSV has 3 columns. Site, User Name, Password.

file attached

 

 

http://img689.imageshack.us/img689/8796/lists.png

 

Link to post
Share on other sites

jackfitz,

 

Your last post will read in a .csv just fine. But it won't split a csv with multiple columns into multiple lists.

 

I've attached a bot that will split a CSV file and show the results in the stats monitor.

Just enter either 0, 1, or 2 for the row you want returned. hth

Link to post
Share on other sites
Guest jackfitz

Thanks :)

 

jackfitz,

 

Your last post will read in a .csv just fine. But it won't split a csv with multiple columns into multiple lists.

 

I've attached a bot that will split a CSV file and show the results in the stats monitor.

Just enter either 0, 1, or 2 for the row you want returned. hth

Link to post
Share on other sites

jackfitz,

 

Your last post will read in a .csv just fine. But it won't split a csv with multiple columns into multiple lists.

 

I've attached a bot that will split a CSV file and show the results in the stats monitor.

Just enter either 0, 1, or 2 for the row you want returned. hth

 

Cheers for the example :D

Link to post
Share on other sites
Guest turbolapp

Crap. I'm completely not getting this concept.   Would someone mind doing a jing tutorial or something?

 

Edit: nm. Finally got bluegoat's example to work (stupid user error) and it all makes much more sense now. I'll try it again and see how far I get.

Link to post
Share on other sites
  • 2 weeks later...

I'm trying to use this method to read a multiple column list. My delimiter is a double pipe (||) and I'm totally stuck.

 

Firstly, it's only adding the first column {0} to the field. Not the second column {1} from the cells list. I'm confused. I think I'm close though.

 

The goal is to loop through ALL of the rows automatically without any user input. I'll add the appropriate delay commands and things for interacting with the page later, but I can't even get the loop to work right. I did take care to clear the list variables at the top as you'll see.

 

Screenshot attached.

Link to post
Share on other sites

That's the funny thing. I was following those tutorials and ended up here.

 

I'll check them out again. I'm betting it's just something simple that I'm overlooking. Any comments on my script are greatly appreciated.

Link to post
Share on other sites

I've copied that video to the letter and for some reason I cannot get it to loop to the second row in the file. It doesn't go past the first row. Any ideas? Here's the completed file...

 

Also, not sure if it's just me, but any replies notifying me of forum updates to threads I'm subscribed to don't get to me.

Link to post
Share on other sites

I've copied that video to the letter and for some reason I cannot get it to loop to the second row in the file. It doesn't go past the first row. Any ideas? Here's the completed file...

try clearing your %items list inside the beginning of your loop, before you do the 'add to list'.

Link to post
Share on other sites

Not sure if it's a bug or a feature, but when I tried the double pipe "||" as the delimiter in one of my scripts, UBot wouldn't recognize the second pipe. It only reads the first one. So I could use "|" as the delimiter in my file, and in UBot I could use "|asdf" as the delimiter and it will read as if I only used "|"

Link to post
Share on other sites

Interesting. I'm not sure. It seems to be reading my || just fine, but I notice that the only way to call the second item is to use {2}. I would have thought this would have been {1}, but instead, {1} seems to be referencing the delimiter itself.

 

Example:

text #1||text #2

 

Anyone else have experience with this? What I've done works...just wondering why it was setup this way. No biggie.

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...