Jump to content
UBot Underground

Can someone help me work through this eval function


Recommended Posts

Hi there.

 

I don't really know the best way to do this but here goes.

 

Let's say that a form has a varying number of asterisks on a page.

 

If the number of asterisks is 3 then run sub.

If the number of asterisks is 4 then run sub.

 

The problem I have is not the above, but how I can arrive at the value that equals the number.

 

Is there a tutorial that will help me understand this.

 

I need to count the number of asterisks (but for the sake of argument could be the number of times the letter X is on a page) then do an eval on that.

 

I am guessing I would use the Page scrape or search page function?

 

Can someone help.

 

Cheers.

Link to post
Share on other sites

Hi there.

 

I don't really know the best way to do this but here goes.

 

Let's say that a form has a varying number of asterisks on a page.

 

If the number of asterisks is 3 then run sub.

If the number of asterisks is 4 then run sub.

 

The problem I have is not the above, but how I can arrive at the value that equals the number.

 

Is there a tutorial that will help me understand this.

 

I need to count the number of asterisks (but for the sake of argument could be the number of times the letter X is on a page) then do an eval on that.

 

I am guessing I would use the Page scrape or search page function?

 

Can someone help.

 

Cheers.

 

scrape the whole page into a variable.

Create temp "List from text" using * as the delimeter.

#numberofasterisks=list total(templist)

dec #numberofasterisks (this is because the list will have one more line that delimeters so you need to decrease by one).

 

Hope that makes sense!

 

Andy

Link to post
Share on other sites

scrape the whole page into a variable.

Create temp "List from text" using * as the delimeter.

#numberofasterisks=list total(templist)

dec #numberofasterisks (this is because the list will have one more line that delimeters so you need to decrease by one).

 

Hope that makes sense!

 

Andy

 

 

Thanks, will have a look at this and let you know.

Link to post
Share on other sites

Thanks, will have a look at this and let you know.

 

How can I scrape the whole page.

 

When I use the command it asks me what I want on the left and right. I just want everything, so I'm not sure what I need to select.

Link to post
Share on other sites

Cool - glad you worked it out. Sometimes with ubot you have to a little 'creative'. Using lists/delimeter to count the number of occurances is something I thought up early on and have used it myself a couple of times.

 

Andy

Link to post
Share on other sites
  • 1 month 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...