Jump to content
UBot Underground

"(SOLVED) Help pulling info from a csv file and looping


Recommended Posts

Hi guys - I am wanting to achieve something using csv format.

 

For testing I am using:

http://ubotsandbox.com/forms.php

 

It's a simple form that requests the following data:

 

1) First name

2) Last name

3) Email address

4) Comment

 

What I want to do is create a simple csv file in the follwoing style:

john,doe,john.doe@fake-email.com,this is my comment, isnt it a cool comment indeed!

jane,doe,janedoe@another-fake-email.com,my comment is better than your comment.

 

... and so on, line after line.

 

What what I am wanting is to read my file, and it pulls the correct entry to go though the process of populating the form, submit it, and do the next line and so on.

 

My main trouble is in figuring out how to make it enter the data that i have in my lines in the right places in the form. So far it tends to just dump the whole line into the first field of the form.

 

If anyone would help, well, that would just be down right cool.

 

If anyone could code a pretty complete example for me - That would get you on my Christmas card list... Just saying.

 

Thanks guys.

Link to post
Share on other sites

Hey Software,

 

This is exactly what you are looking for... A pretty complete example for you B)

 

ubot example for software.ubot

 

Use this text file to see it in action (cleaner than csv, but will work with csv) I think you will get a kick out of it...

 

Account Info For Software.txt

 

Don't forget to send me a christmas card :)

 

HTH,

Justin

  • Like 1
Link to post
Share on other sites

Ha! A2mateit Rules! - Justin, you probably just bypassed the card category and went directly into the gift basket list. You good sir are a Rock Star (or Bot Star) which ever sounds coolest!

 

Thanks so much man.

Link to post
Share on other sites

@Software

 

Well thanks for using my sandbox site. If you need any other test web pages just let me know. If it is doable then I can add it to the site.

 

UBotBuddy

Link to post
Share on other sites

Thanks @UBotBuddy - Thanks for making that sandbox site available to us, it's my core testing ground at this point. I have also already purchased your full source code package and have used the examples in there to create some pretty amazing bots. I of course still have plenty to learn, but between the code you provide, and the great people on this forum who so willingly hand out specific examples (A2mateit Rocks!), my skills have skyrocketed! I have even had a bot recently go sort of viral, so no denying the power of uBot.

Link to post
Share on other sites

@Software

 

Your welcome, I've been helped many, many times in the past and it's good to give back.

 

On a side note, you or one of the mods should edit the title of this thread to something along the lines of:

"(SOLVED) Help pulling info from a csv file and looping" or something along those lines.

 

I think this will help other people find the answer to that problem easier when using the search feature...

 

Keeps people from missing this information, and prevents them from having to open a new thread on the same subject.

 

Just sayin...

 

Justin

Link to post
Share on other sites

@UBotBuddy

 

That is definitely a nice site for learning Ubot. Wish I would have came across that when I first started, would have really shortened my learning curve. :)

Link to post
Share on other sites

Great to hear!

 

I even have a couple of nuggets hidden away right now for that site. Like a WP Blog and a Forum. They will be made available just so users can play with them as well.

Link to post
Share on other sites

Ha! A2mateit Rules! - Justin, you probably just bypassed the card category and went directly into the gift basket list. You good sir are a Rock Star (or Bot Star) which ever sounds coolest!

 

Thanks so much man.

 

I'll PM you my address when it gets closer to Christmas time ;)

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

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