Write Log File of multiple execution of iMacros Scripts

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:


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.

Write Log File of multiple execution of iMacros Scripts

by joseman19 on Mon Sep 19, 2016 9:01 am


I want to write file log of all the multiple lines of each macros script .iim of a javascript file.

Code: Select all
var PATH = prompt("Enter log path:");

var macrolog;

macrolog ="CODE:";
macrolog +="TAB T=1"+"\n";
macrolog +="SET !FILE_PROFILER {{PATH}}"+"\n";
macrolog +="URL GOTO=imacros://run/?m=#TestA02.iim"+"\n";
macrolog +="URL GOTO=imacros://run/?m=#TestA03.iim"+"\n";
macrolog +="URL GOTO=imacros://run/?m=#TestA04.iim"+"\n";
macrolog +="URL GOTO=imacros://run/?m=#TestA05.iim"+"\n";
macrolog +="URL GOTO=imacros://run/?m=#TestA06.iim"+"\n";
macrolog +="URL GOTO=imacros://run/?m=#TestA07.iim"+"\n";
macrolog +="URL GOTO=imacros://run/?m=#TestA08.iim"+"\n";

iimSet("PATH", PATH)

I use the SET !FILE_PROFILER instruction as you can see. The output of my file log is the next:

Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='Profiler.xsl'?>
<!--Profiled with iMacros for Firefox 8.9.7 on Mon Sep 19 2016 17:34:23 GMT+0200--><Macro><Name>Inline code</Name><Command type="errorignoreno" timeout_threshold="0"><String>URL GOTO=imacros://run/?m=#TestA02.iim</String><Line>3</Line><StartTime>17:34:23.562</StartTime><EndTime>17:34:23.563</EndTime><ElapsedSeconds>0.001</ElapsedSeconds><StatusCode/><StatusText>[Exception... "Component returned failure code: 0x805e0006 [nsIWebNavigation.loadURIWithOptions]"  nsresult: "0x805e0006 (&lt;unknown&gt;)"  location: "JS frame :: chrome://browser/content/browser.js :: _loadURIWithFlags :: line 831"  data: no]</StatusText></Command><Start>17:34:23.557</Start><End>17:34:23.565</End><ElapsedSeconds>0.008</ElapsedSeconds><Status><Code>-1001</Code><Text>Error: Component returned failure code: 0x805e0006 [nsIWebNavigation.loadURIWithOptions], line 3</Text></Status></Macro></Profile>

As you can see the file profiler throws an exception.
If I put the SET !FILE_PROFILER in each imacros script works pretty well but it does not interest to me because I want customize my file log path each time I run the script.

I hope you can help me in this problem.
Posts: 2
Joined: Mon Sep 19, 2016 2:36 am

Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 13 guests