SCRIPTING INTERFACE - JavaScript interpretation

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
Kamma
Posts: 4
Joined: Sun Jun 24, 2007 8:52 pm

SCRIPTING INTERFACE - JavaScript interpretation

Post by Kamma » Tue Jun 26, 2007 9:44 pm

Hello!

I have two questions:

1. Do you have own JavaScript interpreter build into iMacros plug-in to Firefox or do you use the Firefox JavaScript parser?

2. I don't know why your plug-in show error ( but it does its job ):

Line 1: SyntaxError: missing ; before statement

after work of this code:

Code: Select all

function EXT(num){
var macro;
var next = "\n";
macro = "CODE:TAB T =1" + next + "FRAME F=3" + next + "EXTRACT POS="+num+" TYPE=OPTION  CONTENT=TXT*";
iimPlay(macro);
return iimGetLastExtract();
}

iimDisplay(EXT(1));
I know that it is connected with line: iimDisplay(EXT(1)); because if I change code to:

Code: Select all

function EXT(num){
var macro;
var next = "\n";
macro = "CODE:TAB T =1" + next + "FRAME F=3" + next + "EXTRACT POS="+num+" TYPE=OPTION  CONTENT=TXT*";
iimPlay(macro);
return iimGetLastExtract();
}

Code: Select all

i = EXT(1);
iimDisplay(i);
[/b]
everything works well.
Kamma
Posts: 4
Joined: Sun Jun 24, 2007 8:52 pm

Post by Kamma » Wed Jun 27, 2007 3:54 pm

I have a third question: why plug-in doesn't allow to use this convention of function note:

Code: Select all

function Something()
{
...
}
Only this convention is right and don't generate syntax errors:

Code: Select all

function Something(){
...
}
JavaScript interpreter in first case thinks that there is no bracket { after function name, but it is in the next line in the code.
Post Reply