iMacros Browser (x86) version 12.6.505.4525
Licensed Product: iMacros Enterprise Edition
Win 10, FF72, imacros for ffV10
Converted my files(10 or so) that I use for web scraping to use the scripting interface now they are .js ext.
Trying to call them from .iim files so I can call them from FF sidebar aka pre FF webextensions.
BTW: Connect_to_FF.js works when call through either HTML or Windows Scripting Host
I have tried":
URL GOTO=imacros://run/?m=your-javascript.js " web page cannot be displayed 'address not understood"
iimPlay("CODE:URL GOTO=imacros://run/?m=recaptcha.js"); "SyntaxError: can not parse macro line 7:"
URL GOTO=javasript:connect_to_FF.js " web page cannot be displayed 'address not understood"
Code: Select all
Call_js_from_iim.iim
VERSION BUILD=12.6.505.4525
TAB T=1
TAB CLOSEALLOTHERS
SET !ERRORIGNORE YES
URL GOTO=imacros://run/?m=connect-to_FF.js
'URL GOTO=javasript:connect_to_FF.js'
'iimPlay("CODE:URL GOTO=imacros://run/?m=connect-to_FF.js");
Code: Select all
Connect_to_FF.js[
var WshShell = WScript.CreateObject("WScript.Shell");
var iim1 = WScript.CreateObject("iMacros");
var iret;
//iret = iim1.iimOpen("-fx", false); //Use open Firefox instance if available
iret = iim1.iimOpen("-fx -fxProfile default-1", true, 60);
if (iret < 0)
{
alert("Could not connect to a FIREFOX web browser.");
}
iret = iim1.iimPlay ("C:\\Users\\Public\\Documents\\iMacros\\Macros\\JS files_site\\RLBTEST2.iim");
//iret = iim1.iimPlay("++++SFD.REV1.js", 60);
//iret = iim1.iimPlay("++++STEP_1T_PROMPT_ADDRESS.iim", 60);
if (iret < 0)
{
var s = iim1.iimGetErrorText();
alert("The Scripting Interface returned error code: " + iret + "\n" + s);
}
alert("Press OK to close Firefox");
iret = iim1.iimClose();
WScript.Quit(iret)
function alert(msg)
{
WshShell.Popup(msg);
}
Code: Select all
RLBTEST2.iim
VERSION BUILD=12.6.505.4525
TAB T=1
TAB CLOSEALLOTHERS
SET !ERRORIGNORE YES
URL GOTO=https://www.youtube.com/
''************PROMPT FOR ADDRESS*********************
PROMPT "The js Call from iim TEST Worked"