Jump to content
UBot Underground

[Solved]Some List Problems.


Recommended Posts

Hey Ubotters, currently right now I am having trouble with my lists & loop.

 

When my bot runs, it adds to list the correct information as I need it, then the loop starts. This is where my problem starts.

 

It should simply fill out the account register page with the information given, then save that information in a text file as field:field:field:field.

 

Scenario 1:

 

Now when I run the bot, it will use $next item, so that way in the loop, it moves onto the next list item. But as where a field needs to be entered twice, I will just use $list item for the 2nd field. As I watch the bot run, it ignores list item and the current position, and moves onto the next email on the list, which completely messes it all up. This goes the same format for the passwords as well.

 

Scenario 2:

For the 2nd attempt I made to solve the problem was to just use $list position in all fields. Once I run the bot of course, on each run, all the information stays the same and doesn't change like it should.

 

 

I would post the file publicly, but I really don't want someone to take it and just modify my program and resell it for their own purposes.

 

If anyone who thinks they have a solution please post, I will PM the source code to you along with some sample files to use.

 

Through out this bot I have gotten little help, and am learning so much on my trial and error experience combined using the ubot wiki, just at this part here, I don't know what to do.

 

Thanks.

Link to post
Share on other sites

""Scenario 2:

For the 2nd attempt I made to solve the problem was to just use $list position in all fields. Once I run the bot of course, on each run, all the information stays the same and doesn't change like it should.""

 

Do you Increment your $list Position at the end of each loop?

Link to post
Share on other sites

""Scenario 2:

For the 2nd attempt I made to solve the problem was to just use $list position in all fields. Once I run the bot of course, on each run, all the information stays the same and doesn't change like it should.""

 

Do you Increment your $list Position at the end of each loop?

I do not, but that sounds like it would work. Only issue is increment accepts variables only.

 

 

EDIT:

 

So I thought more about what I said, and how I am sure I can find a way to use your solution to fix my problem.

 

Anyways, I created 5 variables all set at 0 at the beginning of the script, and once the loop starts, each field that needs a specific text from file will use $list item and will use $list position that is the variable I created earlier which starts at 0. Then at the end it'll increment  the variable, so the next loop is now on 1.

 

 

Thanks a lot itexspert, I can now use this solution in future projects :)

Edited by Ingram Assets
Link to post
Share on other sites

This may help you if I understand correctly.

 

but this is how I do it when I do it...

 

 

clear list(%data)
add list to list(%data$list from text("UN1,PW1
UN2,PW2"$new line), "Delete""Global")
loop($list total(%data)) {
    clear list(%data break down)
    add list to list(%data break down$list from text($next list item(%data), ","), "Delete""Global")
    navigate("http://www.ubotstudio.com/playground/simple-form""Wait")
    wait for element(<last name field>, 10, "Appear")
    type text(<username field>$list item(%data break down, 0), "Standard")
    type text(<password field>$list item(%data break down, 1), "Standard")
    alert("{$list item(%data break down, 0)},{$list item(%data break down, 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...