Game script doesnt work

Discussions and Tech Support related to the iMacros Google Chrome extension.
Forum rules
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
Post Reply
John_Upson
Posts: 1
Joined: Thu Mar 17, 2016 12:58 am

Game script doesnt work

Post by John_Upson » Thu Mar 17, 2016 1:11 am

Hello,

I am new to the forum and quite a computer newbie, so please excuse my ignorance.
I am trying to make a game script work with iMacros for Chrome and not succeeding so far.
The same script however does work in Firefox flawlessly.

If anyone could enlighten me, help would be much appreciated. Allow access to file URLs is ticked.

First the error:
SyntaxError: can not parse macro line 5: GOTO=javascript:var progress....... (to be continued - the script is below)

And here is the imacro:
VERSION BUILD=8961227 RECORDER=FX
SET !ERRORIGNORE YES
WAIT SECONDS=500
URL GOTO=https://ro49.triburile.ro/game.php?vill ... en=am_farm
WAIT SECONDS=4
URL GOTO=javascript:var%20progressElm=$("<div>da</div>");$("#am_widget_Farm").before(progressElm);var%20total=$(".farm_icon_a").length;var%20farms=$(".farm_icon_a");var%20fasend=function(a){if(a==total)return;$(farms[a]).trigger("click");progressElm.html(a+"%20/%20"+total);setTimeout("fasend("+a+"+1)",250+Math.random(250))};fasend(0)
WAIT SECONDS=55
URL GOTO=https://ro49.triburile.ro/game.php?vill ... en=am_farm
WAIT SECONDS=4
URL GOTO=javascript:var%20progressElm=$("<div>da</div>");$("#am_widget_Farm").before(progressElm);var%20total=$(".farm_icon_a").length;var%20farms=$(".farm_icon_a");var%20fasend=function(a){if(a==total)return;$(farms[a]).trigger("click");progressElm.html(a+"%20/%20"+total);setTimeout("fasend("+a+"+1)",250+Math.random(250))};fasend(0)
WAIT SECONDS=55
URL GOTO=https://ro49.triburile.ro/game.php?vill ... en=am_farm
WAIT SECONDS=4
URL GOTO=javascript:var%20progressElm=$("<div>da</div>");$("#am_widget_Farm").before(progressElm);var%20total=$(".farm_icon_a").length;var%20farms=$(".farm_icon_a");var%20fasend=function(a){if(a==total)return;$(farms[a]).trigger("click");progressElm.html(a+"%20/%20"+total);setTimeout("fasend("+a+"+1)",250+Math.random(250))};fasend(0)
WAIT SECONDS=1800

PS: I am running Chrome on Linux, but I guess that does not make a difference to Chrome on Windows.
chivracq
Posts: 8929
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Game script doesnt work

Post by chivracq » Thu Mar 17, 2016 1:55 am

John_Upson wrote:Hello,

I am new to the forum and quite a computer newbie, so please excuse my ignorance.
I am trying to make a game script work with iMacros for Chrome and not succeeding so far.
The same script however does work in Firefox flawlessly.

If anyone could enlighten me, help would be much appreciated. Allow access to file URLs is ticked.

First the error:
SyntaxError: can not parse macro line 5: GOTO=javascript:var progress....... (to be continued - the script is below)

And here is the imacro:

Code: Select all

VERSION BUILD=8961227 RECORDER=FX
SET !ERRORIGNORE YES
WAIT SECONDS=500
URL GOTO=https://ro49.triburile.ro/game.php?village=13086&screen=am_farm
WAIT SECONDS=4
URL GOTO=javascript:var%20progressElm=$("<div>da</div>");$("#am_widget_Farm").before(progressElm);var%20total=$(".farm_icon_a").length;var%20farms=$(".farm_icon_a");var%20fasend=function(a){if(a==total)return;$(farms[a]).trigger("click");progressElm.html(a+"%20/%20"+total);setTimeout("fasend("+a+"+1)",250+Math.random(250))};fasend(0)
WAIT SECONDS=55
URL GOTO=https://ro49.triburile.ro/game.php?village=n7198&screen=am_farm
WAIT SECONDS=4
URL GOTO=javascript:var%20progressElm=$("<div>da</div>");$("#am_widget_Farm").before(progressElm);var%20total=$(".farm_icon_a").length;var%20farms=$(".farm_icon_a");var%20fasend=function(a){if(a==total)return;$(farms[a]).trigger("click");progressElm.html(a+"%20/%20"+total);setTimeout("fasend("+a+"+1)",250+Math.random(250))};fasend(0)
WAIT SECONDS=55
URL GOTO=https://ro49.triburile.ro/game.php?village=n13086&screen=am_farm
WAIT SECONDS=4
URL GOTO=javascript:var%20progressElm=$("<div>da</div>");$("#am_widget_Farm").before(progressElm);var%20total=$(".farm_icon_a").length;var%20farms=$(".farm_icon_a");var%20fasend=function(a){if(a==total)return;$(farms[a]).trigger("click");progressElm.html(a+"%20/%20"+total);setTimeout("fasend("+a+"+1)",250+Math.random(250))};fasend(0)
WAIT SECONDS=1800
PS: I am running Chrome on Linux, but I guess that does not make a difference to Chrome on Windows.
FCIM...! :mrgreen:
You don't mention your FCI but I reckon you'll be at v8.3.5 on CR48 or CR49 and iMacros for CR seems to be a bit buggy/broken at this moment since the CR49 Update and it's not clear at this moment what works and what doesn't, you have several Threads in this current 'iMacros for CR' Sub-Forum, so for the time being, you should stick to FF and wait until iMacros for CR gets a bit more stable again...

I would think that if your 'URL GOTO=javascript' Statement works in FF, it should work as well CR. You could maybe try first with some a bit more simple Statement like the Scrolling Statement from the Wiki:

Code: Select all

URL GOTO=javascript:window.scrollBy(0,20000)
You could try running your JavaScript Statement in the Console as well...

And you can try replacing the Spaces in your Statement with '<SP>', maybe the FF JavaScript Runtime Engine is able to parse the '%20' bits, but the CR Engine not...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply