Is it possible to define Macros AFTER iimPlay()?

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.

Is it possible to define Macros AFTER iimPlay()?

by viking on Tue Dec 31, 2013 3:42 pm

For better readability of javaScripts I would prefer to define my Macros after the iimplay() command.

For example, normally, I would write a javaScript like this:
Code: Select all
var macro;

macro = "CODE:";
macro += "PROMPT YES" + "\n";

retcode=iimPlay(macro);
(This executes fine)
However, I would prefer to write it like this:
Code: Select all
var macro;

retcode=iimPlay(macro);

macro = "CODE:";
macro += "PROMPT YES" + "\n";
(However, this gives an error: TypeError: path is undefined, line: 171 (Error code: 991) -- BTW, why line 171!?)

Is there any way to write the javaScript before the often very long Macro definitions?

p.s. I know that I can call an external file which has the macro: iimplay(macro.iim). However, I prefer to have the macros defined in the javaScript file.
viking
 
Posts: 208
Joined: Sun Mar 16, 2008 12:22 am

Return to iMacros for Firefox

Who is online

Users browsing this forum: Google [Bot] and 13 guests

-->