obj iMacro stuck during script post download cmd

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
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
Ram
Posts: 22
Joined: Mon Jul 21, 2014 11:19 am

obj iMacro stuck during script post download cmd

Post by Ram » Thu Aug 07, 2014 1:24 pm

Hi All,

OS windows 8 64b
Firefox 31.0

My iMacro ver:
Macros Browser (x86) Version 10.0.2.2823
Enterprise Edition
Released on 27 May 2014

Addon ver:
iMacros For Firefox 8.8.2
Last updated July 14, 2014

Scripting language:
Excel 2013 VBA
Early binding to iimInterface.dll

Architecture:
using excel to create, open and execute several commands via Firefox instance to a trading platform

The problem:
while running the script to download a file the iMacro object in the VBA code lose connection to the firefox browser after downloading successfully the file inside the same procedure, any attempt to execute anything using the iMacro object right after reaches a timeout as if the iMacros stuck for good.

The code:

Code: Select all

    If obj_iMacro Is Nothing Then Set obj_iMacro = CreateObject("iMacros")
    ' open firefox
    iret = obj_iMacro.iimOpen("-fx -fxProfile " & ActiveUser.Profile, False)
    ' add user name to FF instance
    iret = obj_iMacro.iimDisplay(ActiveUser.FullName)

    ' login user
    Call usrLogin

    'Clear Old File
    sbDeletetingAFile "c:\tmp\" & ActiveUser.Account & "_Portfolio.csv"

    iMacro = ""
    iMacro = "TAG POS=2 TYPE=A ATTR=TXT:Portfolio" + vbNewLine
    iMacro = iMacro + "ONDOWNLOAD FOLDER=c:\tmp FILE=" & ActiveUser.Account & "_Portfolio.csv WAIT=YES" + vbNewLine
    iMacro = iMacro + "TAG POS=1 TYPE=A ATTR=TXT:Export<SP>to<SP>Excel" + vbNewLine

    iret = obj_iMacro.iimPlayCode(iMacro)
    'check for error
    If iret < 0 Then
        ' show error msg
        MsgBox "Cant execute FF macro in sub: Portfolio " & ActiveUser.FullName
        Stop
    End If

    ' THIS NOW RETURNS AN ERROR -3 "Error while receiving response"
     Chk = "ADD !EXTRACT {{!URLCURRENT}}" + vbNewLine
     iret = obj_iMacro.iimPlayCode(Chk, 10)
     If iret = "-3" Then Stop
     URL = obj_iMacro.iimGetExtract()

the browser still open and the file itself downloaded with no problems but whatever i try to do right after the download script part with the iMacro object fails as ithe obj is stuck..

Please advice as i'm totally lost now :cry: :cry: :cry: :cry: :cry:

Thank you all in advance!!!
Best,
R.
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: obj iMacro stuck during script post download cmd

Post by Tom, Tech Support » Fri Aug 08, 2014 2:05 pm

Hi Ram,

Please see this forum thread.
Regards,

Tom, iMacros Support
Ram
Posts: 22
Joined: Mon Jul 21, 2014 11:19 am

Re: obj iMacro stuck during script post download cmd

Post by Ram » Fri Aug 08, 2014 2:20 pm

Hi Tom,

Thank you for your reply.

I downgraded FF to ver 30.0 and i still face the exact same problem.

Thanks much in advance!
Best,
R.
Ram
Posts: 22
Joined: Mon Jul 21, 2014 11:19 am

Re: obj iMacro stuck during script post download cmd

Post by Ram » Fri Aug 08, 2014 2:25 pm

WOW!!

FF updated itself in the background and return to ver 31.0 without me knowing it :)

once again i downgraded FF to v30.0 (this time disabled auto update) and all IS WORKING WELL!!!!


YEY!!! :P :P :P :P :P

Thank much!!!!
Cheers,
R.
Post Reply