unable to open firefox and run imacros with php

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
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
qnguye
Posts: 10
Joined: Tue Feb 02, 2021 1:10 am

unable to open firefox and run imacros with php

Post by qnguye » Thu Feb 11, 2021 11:28 pm

My setup: Windows 10, Firefox 85.02 (64bit), iMacros for Firefox 10.0.2.1450, imacros, imacros 12.6 (enterprise, evaluation) installed with file access. Firefox has profile name ff85. i have run.iim file at macros directory path.
Below is php

Code: Select all

 <?php
$iim1 = new COM("imacros");
$iim1->iimOpen("-fx -fxProfile ff85");
$iim1->iimPlay("run.iim")
sleep(5);
$iim1->iimClose();
?>
when i run that php in cli, firefox open correct profile but it didn't run run.iim and did not close the firefox. When firefox open, the address on the address bar looks weird

Code: Select all

file:///C:/Users/mynamehere/AppData/Local/Temp/41b70d31b881c31c5f125f5fcaf1df64.html?pipe=//./pipe/im-fx-41b70d31b881c31c5f125f5fcaf1df64.runner
I also tried to add -runner for for iiOpen and it won't open firefox at all
What did I do wrong?
Tom, Tech Support
Posts: 3682
Joined: Mon May 31, 2010 4:59 pm

Re: unable to open firefox and run imacros with php

Post by Tom, Tech Support » Fri Feb 19, 2021 12:34 pm

Hi qnguye,

First question: Is iMacros for Firefox installed for the FF85 profile?

Next question: Are you able to successfully launch iMacros in the FF85 profile using the sample connect-to-fx.vbs script included with the iMacros Enterprise installer?

If you did not install the samples initially, you there should be a program shortcut to launch the samples installer (otherwise, you can also find them at http://wiki.imacros.net/Sample_Code#VBS ... ripting.29). You will need to edit the iimOpen call in the VBScript first and add -fxProfile FF85.
Regards,

Tom, iMacros Support
qnguye
Posts: 10
Joined: Tue Feb 02, 2021 1:10 am

Re: unable to open firefox and run imacros with php

Post by qnguye » Fri Feb 19, 2021 6:29 pm

yes, iMacros for Firefox version 10.0.2.1450.
I have everything installed with sample codes. sample codes only works with imacros browser, not with firefox. I tried all kind of programming like Powershell, VBS, PHP, none of them work. Basically, firefox opened and then don't do anything. The address URL has this
file:///C:/Users/mynamehere/AppData/Local/Temp/41b70d31b881c31c5f125f5fcaf1df64.html?pipe=//./pipe/im-fx-41b70d31b881c31c5f125f5fcaf1df64.runner
Tom, Tech Support
Posts: 3682
Joined: Mon May 31, 2010 4:59 pm

Re: unable to open firefox and run imacros with php

Post by Tom, Tech Support » Tue Feb 23, 2021 6:07 pm

Does it work if you make the FF85 profile the default profile? You can do this by starting firefox from a command prompt using:

firefox.exe -p

This will display the Choose User Profile dialog. Select the FF85 profile and check 'Use the selected profile without asking at startup'. Then, remove -fxProfile FF85 from the options passed to iimOpen.

If this still doesn't work, then I would suggest creating a new Firefox user profile and only install iMacros in that profile (do not install any other add-ons) and try it again with the new profile.
Regards,

Tom, iMacros Support
Post Reply