Loop script until...

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Loop script until...

Post by Tom, Tech Support » Wed Aug 17, 2011 8:41 am

322126384 wrote:the code clicks on the up arrow. then it searches for Level: 44-99. then it is passed to the TAG command which encorporates the FAIL_IF_FOUND event and looks in the html elements for "Level: (whichever number between 44-99 was found)".
Clever! Thanks for sharing your solution!
Regards,

Tom, iMacros Support
ssjmaz
Posts: 6
Joined: Sat Aug 13, 2011 5:21 pm

Re: Loop script until...

Post by ssjmaz » Wed Aug 17, 2011 3:54 pm

Would it be possible to click an image(the down arrow) 24 times and then to click another image (up arrow) another 24 times?

Also i tested this macro

Code: Select all

TAG POS=1 TYPE=IMG ATTR=SRC:http://static.pokemonvortex.org/images/maps/arrows/arrowup.gif
SET !ERRORIGNORE YES
SEARCH SOURCE=REGEXP:"Level: ([4-9]{2})" EXTRACT=$1
SET !ERRORIGNORE NO
TAG POS=1 TYPE=P ATTR=TXT:Level:<SP>{{!EXTRACT}} CONTENT=EVENT:FAIL_IF_FOUND
And when a 73 pokemon appeared nothing happend it just continued :(
User avatar
322126384
Posts: 32
Joined: Sat Jul 23, 2011 1:39 am

Re: Loop script until...

Post by 322126384 » Wed Aug 17, 2011 7:12 pm

Oh sorry. As MattBell7 previously corrected, you should change the REGEXP to "Level: ([5-9][0-9])". i made a mistake. in regards to your question:
Would it be possible to click an image(the down arrow) 24 times and then to click another image (up arrow) another 24 times?
you would have to use Javascript. check out this post -->http://forum.imacros.net/viewtopic.php?f=11&t=13467

OR

you might want to use POS in the TAG command.
-322126384
ssjmaz
Posts: 6
Joined: Sat Aug 13, 2011 5:21 pm

Re: Loop script until...

Post by ssjmaz » Wed Aug 17, 2011 8:33 pm

I used the REGEXP "Level: ([5-9][0-9])" and still nothing , to test it easier i modified the the level into ([1-9][0-9]) so it would stop when a level 11 or 12 pokemon would appear because it's more common, and it just continues the macro.
This is how my macro looks: http://pastebin.com/Z66K8t0v
I also tried play(loop) with the code you posted and still no luck.
Prince
Posts: 1
Joined: Fri Oct 21, 2011 1:05 pm

Re: Loop script until...

Post by Prince » Fri Oct 21, 2011 1:09 pm

Can anyone tell me the full imacro script for pokemon vortex Please
I tried a lot but i was unable.....
So pls can anyone tell me the full script for Pokemon vortex
User avatar
322126384
Posts: 32
Joined: Sat Jul 23, 2011 1:39 am

Re: Loop script until...

Post by 322126384 » Sat Oct 29, 2011 6:51 pm

Try this old post:

http://forum.imacros.net/viewtopic.php?f= ... 688#p40688

or

use this script:

Code: Select all

TAG POS=1 TYPE=IMG ATTR=SRC:http://static.pokemonvortex.org/images/maps/arrows/arrowup.gif
SET !ERRORIGNORE YES
SET !TIMEOUT 20
SEARCH SOURCE=REGEXP:"Level: ([5-9][0-9])" EXTRACT=$1
TAG POS=1 TYPE=P ATTR=TXT:Level:<SP>{{!EXTRACT}}
TAG POS=R-1 TYPE=P ATTR=TXT:*
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=NAME:* ATTR=ID:*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:battleForm ATTR=VALUE:Continue
TAG POS=5 TYPE=INPUT:RADIO FORM=ID:itemForm ATTR=ID:item2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:itemForm ATTR=NAME:items&&VALUE:Use<SP>Item
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:battleForm ATTR=VALUE:Continue!
TAG POS=1 TYPE=A ATTR=TXT:Return<SP>to<SP>the<SP>Map
NOTE: The above script only works going up. Eventually your sprite will no longer be able to move on the map. Try holding Ctrl+Shift+K to get the Web developer's web console before running the script. Type in PlayRequest (0,0). This will allow you to go up forever, but still find pokemon.

But it is better and way faster to download greasemonkey free and install the userscript. I also have added new features to my version of the userscript. If you want it, message me on Pokemon Vortex. My username is umar322126384.
-322126384
awesome7
Posts: 10
Joined: Fri Jul 22, 2011 6:37 am

Re: Loop script until...

Post by awesome7 » Thu Nov 10, 2011 8:17 am

ssjmaz wrote:Would it be possible to click an image(the down arrow) 24 times and then to click another image (up arrow) another 24 times?

Also i tested this macro

Code: Select all

TAG POS=1 TYPE=IMG ATTR=SRC:http://static.pokemonvortex.org/images/maps/arrows/arrowup.gif
SET !ERRORIGNORE YES
SEARCH SOURCE=REGEXP:"Level: ([4-9]{2})" EXTRACT=$1
SET !ERRORIGNORE NO
TAG POS=1 TYPE=P ATTR=TXT:Level:<SP>{{!EXTRACT}} CONTENT=EVENT:FAIL_IF_FOUND
And when a 73 pokemon appeared nothing happend it just continued :(
can any one pls tell what changes should made in this script so that when a higher level appears it stop automatically pls help
tunderman
Posts: 1
Joined: Tue Nov 22, 2011 12:18 pm

Re: Loop script until...

Post by tunderman » Tue Nov 22, 2011 12:29 pm

322126384 wrote:i just tested the macro and it runs perfectly. I just caught 3 legendary pokemon! :D Good Luck Catching Pokemon!!
the script doesn't run well, can you help me plz?
is there any way i cant contact you with e-mail or something?
Post Reply