Url Change when i loop

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

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.

Url Change when i loop

by FlerpingDerp on Thu Jul 27, 2017 4:33 pm

So yeah, i am really new to programming.
I am running a macro to auto train a pokemon in a clicker game (iknow grow up)
but here is the problem: the ur for 1 of the clicks changes after every loop because the pokemon has leveled up.
meaning i cant loop my macro (with my knowledge) i have tested it and the ur changes by 3 or for below an example:
c=003 into c=006 into c=009 into c=004
this is random as far as i tested it so i cannot point out how the changes will be in the future. anyways this is my ful code:
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
URL GOTO=http://pokemoncreed.net/battle.php?opp=Mysterious_Trainer
TAG POS=2 TYPE=INPUT:SUBMIT FORM=ACTION:battle.php?c=15555 ATTR=NAME:move
TAG POS=1 TYPE=A ATTR=TXT:Golurk
TAG POS=3 TYPE=INPUT:SUBMIT FORM=ACTION:battle.php?c=3740 ATTR=NAME:move
TAG POS=3 TYPE=INPUT:SUBMIT FORM=ACTION:battle.php?c=3740 ATTR=NAME:move
TAG POS=1 TYPE=A ATTR=TXT:Golurk
TAG POS=3 TYPE=INPUT:SUBMIT FORM=ACTION:battle.php?c=3951 ATTR=NAME:move
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:battle.php?c=3951 ATTR=NAME:move
TAG POS=4 TYPE=SPAN ATTR=TXT:w
TAG POS=3 TYPE=INPUT:SUBMIT FORM=ACTION:battle.php?c=10778 ATTR=NAME:move
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:battle.php?c=10778 ATTR=NAME:move
TAG POS=2 TYPE=SPAN ATTR=TXT:k
TAG POS=3 TYPE=INPUT:SUBMIT FORM=ACTION:battle.php?c=8247 ATTR=NAME:move
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:battle.php?c=8247 ATTR=NAME:move
TAG POS=5 TYPE=SPAN ATTR=TXT:u
TAG POS=2 TYPE=INPUT:SUBMIT FORM=ACTION:battle.php?c=57103 ATTR=NAME:move
TAG POS=1 TYPE=BUTTON ATTR=TXT:Restart<SP>Battle

Also on a sidenote, sometimes i get error -921. this is random since i can replay the macro 5 times without a problem and the 6th it has a problem in a random line. but back to the main topic, the line with the changing url is the 2nd from below. as you can see it sais c=57103 right now, but if i run this maco once that has changed with about +3 OR +4.
so anyone can help me?
FlerpingDerp
 
Posts: 1
Joined: Thu Jul 27, 2017 4:18 pm

Re: Url Change when i loop

by JGuy on Sat Jul 29, 2017 7:15 am

SET !VAR1 {{!URLCURRENT}}
This copies your current url (to the chosen variable)
Then use the code:
URL GOTO={{!VAR1}}
And you're set.
Hope that helps.
JGuy
 
Posts: 4
Joined: Sat Jul 29, 2017 7:05 am


Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 6 guests

-->