Jump to content
UBot Underground

Question about revising the selector to allow <>=> etc


Recommended Posts

I used click and then i selected an element i wanted it to click.

after selecting, it shows me  this code: 

 

<onclick="Whatever.close(553262, 50000);">

 

and i want to change it to something like this (using the cogwheel thing)

 

<onclick="Whatever.close(*, =>50000);">

 

i want the first value to be wildcard and it works fine but when i add the => to the second value, it doesn't work (can't find it)

 

How can I solve this?

 

I just want to add a simple "if smaller/greater than.." basically: click everything where the second value is greater/equal 50000

Link to post
Share on other sites

I don't think you can use greater or equal to inside element selector.

 

If you need something more complex than wildcard, you should use regular expression for matching...

Link to post
Share on other sites

I don't think you can use greater or equal to inside element selector.

 

If you need something more complex than wildcard, you should use regular expression for matching...

 

Is there really no simple solution? Does anyone know what i have to add to the regular expression to get this done..?

I don't want to spend days/hours learning regular expressions to solve a problem that should be much easier to solve :wacko:

 

onclick command looks like this without changing it: <onclick="Whatever.close(553262, 50000);">

the first value (553262) should be wildcard OR greater than 1 and the second value (50000) should be smaller than x or a number from x-x(not random, i want it to search the page for any number from x to x) ... whatever is easier to solve.

 

:unsure:

Link to post
Share on other sites

Harisc1990,

From what you are describing, I would be tempted to load all the onclick= commands you find on the page into a UBOT list.

Then I would loop thru the list,

      parse out the numbers to a table with two columns,

         then loop thru the table checking each row with an IF statement to see if it is what I am looking for

             and if one is found then call a define to do something with it.

Link to post
Share on other sites

Harisc1990,

From what you are describing, I would be tempted to load all the onclick= commands you find on the page into a UBOT list.

Then I would loop thru the list,

      parse out the numbers to a table with two columns,

         then loop thru the table checking each row with an IF statement to see if it is what I am looking for

             and if one is found then call a define to do something with it.

 

I want it to click something that might not exist on the page

 

loop -> navigate page -> click element <onclick="Whatever.close(*, =<50000);"> -> repeat

Link to post
Share on other sites

I want it to click something that might not exist on the page

 

loop -> navigate page -> click element <onclick="Whatever.close(*, =<50000);"> -> repeat

 

I understand. So if you use the method I described, it will determine if it exists and if it exists you call the define which would go back to the found onclick and click it.

Link to post
Share on other sites

Most probably you will need regex similar to this one:

add list to list(%FOOTPRINT, $scrape attribute(<onclick=r"^Whatever\\.close\\(\\d+,\\s*[5-9]\\d\{4,4\}\\);$">, "onclick"), "Delete", "Global")

If you want to use that regex inside click command directly you should use it in combination with "$element offset" function.

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