Click every button on a webpage using wildcards?

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Click every button on a webpage using wildcards?

by smashedpumpkins on Thu Dec 09, 2010 12:59 pm

I'm loading a page with 100's of buttons that I need to click. I've been clicking them manually, but it's taking way too long. I would like to setup imacros to click every single button for me. However, the thing is, each button has a different ID. My first thought was to use a wild card. Below is an example of some of the buttons. As you can see they all begin with helpful and end with random numbers and letters.

Code: Select all
TAG POS=1 TYPE=DIV ATTR=ID:helpfulFAE8DAED-C703-E011-A438-A4BADB212A79
TAG POS=1 TYPE=DIV ATTR=ID:helpfulAABF231C-C703-E011-A438-A4BADB212A79
TAG POS=1 TYPE=DIV ATTR=ID:helpful97EB0116-C703-E011-A438-A4BADB212A79


I went ahead and tried the following, but it clicked the first button every single time instead of moving on to the next button. So the real question then is, how can I make it click every single button on the page, starting with helpful, using wild cards? I want it to search the page for all possible scenarios and click each button.

Code: Select all
TAG POS=1 TYPE=DIV ATTR=ID:helpful*
TAG POS=1 TYPE=DIV ATTR=ID:helpful*
TAG POS=1 TYPE=DIV ATTR=ID:helpful*


Thanks for any help you can offer. It's really appreciated.
smashedpumpkins
 
Posts: 14
Joined: Tue Aug 24, 2010 12:56 pm

Re: Click every button on a webpage using wildcards?

by siniy on Thu Dec 09, 2010 6:45 pm

Code: Select all
SET !LOOP 1
TAG POS={{!LOOP}} TYPE=DIV ATTR=ID:helpful*

Play this macros in 100 loops
siniy
 
Posts: 118
Joined: Sat Nov 07, 2009 12:44 pm

Re: Click every button on a webpage using wildcards?

by smashedpumpkins on Thu Dec 09, 2010 6:57 pm

siniy wrote:
Code: Select all
SET !LOOP 1
TAG POS={{!LOOP}} TYPE=DIV ATTR=ID:helpful*

Play this macros in 100 loops

Thanks a million. It didn't even occur to me to change POS. Guess it was a no brainer hah.
smashedpumpkins
 
Posts: 14
Joined: Tue Aug 24, 2010 12:56 pm

Re: Click every button on a webpage using wildcards?

by Zeeshan on Fri Nov 23, 2012 9:30 am

I too have a similar problem. But the thing is ATTR=Value: also is changing the word slightly every visit. I added * symbol but still it plays loop for the first and then again the tag say runtime error...

Imarcos Recorded.
Code: Select all
VERSION BUILD=7601105 RECORDER=FX
TAB T=1
URL GOTO=http://sigma.pokemon-vortex.com/battle.php?bid=527828
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:1661 ATTR=VALUE:<SP>Continue!<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:3220 ATTR=VALUE:Attack<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:6841 ATTR=VALUE:Continue<SP>...
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:4132 ATTR=VALUE:Continue?
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:2085 ATTR=VALUE:Attack<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:2910 ATTR=VALUE:<SP>Continue<SP><SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:5673 ATTR=VALUE:Continue<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:6589 ATTR=VALUE:Attack
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:4487 ATTR=VALUE:<SP>Continue<SP>?
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:4922 ATTR=VALUE:<SP>Continue<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:8113 ATTR=VALUE:<SP>Attack..<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:5563 ATTR=VALUE:Continue<SP><SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:7123 ATTR=VALUE:Continue<SP>!<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:5852 ATTR=VALUE:<SP>Attack...<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:4572 ATTR=VALUE:<SP>Continue<SP>?
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:2272 ATTR=VALUE:Continue.<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:5812 ATTR=VALUE:Attack<SP>..<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:5039 ATTR=VALUE:<SP>Continue<SP>..


my code
Code: Select all
VERSION BUILD=7601105 RECORDER=FX
TAB T=1
URL GOTO=http://sigma.pokemon-vortex.com/battle.php?bid=527828
SET !LOOP 1
TAG POS={{!LOOP}} TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:Continue*
Zeeshan
 
Posts: 6
Joined: Wed Nov 21, 2012 2:28 am

Re: Click every button on a webpage using wildcards?

by bobis on Fri Nov 23, 2012 3:25 pm

there is already thread about pokemon vortex : viewtopic.php?f=11&t=18546
Get Best iMacros scripts at http://imacrosbot.com/
User avatar
bobis
 
Posts: 364
Joined: Sat Sep 11, 2010 8:34 am

Re: Click every button on a webpage using wildcards?

by Zeeshan on Fri Nov 23, 2012 8:07 pm

Bobis i tried add that too..

Code: Select all
VERSION BUILD=7601105 RECORDER=FX
TAB T=1
URL GOTO=http://omega.pokemon-vortex.com/battle.php?bid=5278288
URL GOTO=javascript:document.forms[1].submit();
SET !LOOP 1
TAG POS={{!LOOP}} TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Attack*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:* ATTR=VALUE:*Continue*


Again it says
Code: Select all
RuntimeError: element INPUT specified by VALUE:*Continue* was not found, line: 6 (Error code: -921)
Zeeshan
 
Posts: 6
Joined: Wed Nov 21, 2012 2:28 am

Re: Click every button on a webpage using wildcards?

by Yusan on Tue Mar 24, 2015 7:50 am

Hello, Then how if the code only show like this?
TAG POS=1 TYPE=IMG ATTR=ID:skip_ad_button
TAG POS=1 TYPE=BUTTON ATTR=ID:t2zAuLvpuI20ypdX18pP10rnyNToHrh0
TAG POS=1 TYPE=IMG ATTR=ID:skip_ad_button
TAG POS=1 TYPE=BUTTON ATTR=ID:sK32T3K47k8d1D39D1W9Db6gIz6ZoViG
TAG POS=1 TYPE=IMG ATTR=ID:skip_ad_button
TAG POS=1 TYPE=BUTTON ATTR=ID:jeQMfssFbiX9J5j2Vu0VHxakDf613FHd
TAG POS=1 TYPE=IMG ATTR=ID:skip_ad_button
Yusan
 
Posts: 1
Joined: Tue Mar 24, 2015 7:43 am


Return to iMacros for Firefox

Who is online

Users browsing this forum: Google [Bot] and 7 guests

-->