Loop with Javascript

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.

Loop with Javascript

by zurello on Mon May 22, 2017 12:24 am

Hi, here again with a new problem.
Sorry for my english...i'm writing from Italy
I'm using iMacros v9.0.3 on Firefox 53.0.3 (64 bit) (64-bit). The OS I'm using is Windows 7 x64
I try to make a javascrit that when the url is for example http://www.google.it run a macro, also stop everything.
I used all my capability and made this:

Code: Select all
var currentURL = window.location.href;

IF {(currentURL=www.google.it) }
THEN
{iimPlay("Random numbers")
}


"Random numbers" is macro that js must run, else stop.
Problem is that when i run js i have this error:"Error: Accessing content window is not supported in multiprocess Firefox, line 208 (Error code: -991)"
I try search a solution but don't found nothing.
Can you help me?
Thanks
zurello
 
Posts: 9
Joined: Mon Jul 18, 2016 11:08 pm

Re: Loop with Javascript

by chivracq on Mon May 22, 2017 3:54 am

zurello wrote:Hi, here again with a new problem.
Sorry for my english...i'm writing from Italy
I'm using
Code: Select all
iMacros v9.0.3 on Firefox 53.0.3 (64 bit) (64-bit).
The OS I'm using is Windows 7 x64

I try to make a javascrit that when the url is for example http://www.google.it run a macro, also stop everything.
I used all my capability and made this:

Code: Select all
var currentURL = window.location.href;

IF {(currentURL=www.google.it) }
THEN
{iimPlay("Random numbers")
}


"Random numbers" is macro that js must run, else stop.
Problem is that when i run js i have this error:"Error: Accessing content window is not supported in multiprocess Firefox, line 208 (Error code: -991)"
I try search a solution but don't found nothing.
Can you help me?
Thanks

Yep, known Limitation with v9.0.3 for FF, documented in the Release Notes and you have several Threads on the Forum about it, like this one for example:
- Accessing content window not supported in multiprocess FF

But hum..., I had advised you in your previous Thread to stay at v8.9.7, ah-ah...!:
OK, good, we finally have your FCI...!
Hum..., and little piece of Advice, stay at v8.9.7, the latest v9.0.3 Version is a bit buggy...


Easy Workaround in your Case would be to use the '!URLCURRENT' Built-in Var... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5988
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Loop with Javascript

by zurello on Mon May 22, 2017 5:45 am

Here i'm.
Ok, i get back to imacros 8.9.7 and study a bit more and thinked this:

Code: Select all
if (/google/.test(window.location.href))  {iimPlay("Random.iim")};


I thinked and search better and i solved!!!!
Code: Select all
if (/google/.test(window.location.href))
 {iimPlay("C:\\Users\\Mydocuments\\Documents\\iMacros\\Macros\\Demo-Firefox\\Random.iim")};

Thank you for everything and for let me think :D
zurello
 
Posts: 9
Joined: Mon Jul 18, 2016 11:08 pm


Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 8 guests

-->