iimInit and iimOpen always return -1

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++.

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.

iimInit and iimOpen always return -1

by jairbj on Mon Sep 14, 2015 3:36 pm

Hi friends, I'm new to Scripting Interface but I'm getting an error calling iimInit or iimOpen.

The imacros browser opens and It always return -1, after that close the browse.

I'm trying to develop in vb.net but also with the supplied VBS/C#/C++ demos the same problem occurs.

I'm using windows 10.

VB.NET code:

Code: Select all
Imports Status = iMacros.Status
Imports System.Text

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        startIMacros()

    End Sub

    Private m_app As iMacros.App

    Private Sub startIMacros()
        Dim builder As New StringBuilder
        builder.Append("CODE:")
        builder.Append("SET !USERAGENT 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'")
        builder.Append("TAB T=1")
        builder.Append("TAB CLOSEALLOTHERS")
        builder.Append("URL GOTO=http://www.google.com")

        Const cmdTimeout = 60

        Dim s As iMacros.Status

        m_app = New iMacros.App

        s = m_app.iimOpen("", True)
        MsgBox("Return Code: " + CStr(s))

        s = m_app.iimPlayCode(builder.ToString, cmdTimeout)

        If s > 0 Then
            MsgBox("Macro completed ok")
        ElseIf s < 0 And s > -100 Then
            MsgBox("Interface problem: " + CStr(s))
        Else
            MsgBox("Macro problem: " + CStr(s))
        End If

        s = m_app.iimExit()

    End Sub

End Class


I also tried with "-runner" option and I get a -6 error (with iimRunner opened).

UPDATE:
I tried the same scripts in Windows XP and it run well.
So the problem may be related to Windows 10.
Any solution for windows 10?

I'll try in Windows 2008 R2 that will be my target OS and will post more information.
jairbj
 
Posts: 6
Joined: Mon Sep 14, 2015 3:14 pm

Re: iimInit and iimOpen always return -1

by chivracq on Tue Sep 15, 2015 5:51 pm

jairbj wrote:Hi friends, I'm new to Scripting Interface but I'm getting an error calling iimInit or iimOpen.

The imacros browser opens and It always return -1, after that close the browse.

I'm trying to develop in vb.net but also with the supplied VBS/C#/C++ demos the same problem occurs.

I'm using windows 10.

VB.NET code:

Code: Select all
Imports Status = iMacros.Status
Imports System.Text

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        startIMacros()

    End Sub

    Private m_app As iMacros.App

    Private Sub startIMacros()
        Dim builder As New StringBuilder
        builder.Append("CODE:")
        builder.Append("SET !USERAGENT 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'")
        builder.Append("TAB T=1")
        builder.Append("TAB CLOSEALLOTHERS")
        builder.Append("URL GOTO=http://www.google.com")

        Const cmdTimeout = 60

        Dim s As iMacros.Status

        m_app = New iMacros.App

        s = m_app.iimOpen("", True)
        MsgBox("Return Code: " + CStr(s))

        s = m_app.iimPlayCode(builder.ToString, cmdTimeout)

        If s > 0 Then
            MsgBox("Macro completed ok")
        ElseIf s < 0 And s > -100 Then
            MsgBox("Interface problem: " + CStr(s))
        Else
            MsgBox("Macro problem: " + CStr(s))
        End If

        s = m_app.iimExit()

    End Sub

End Class


I also tried with "-runner" option and I get a -6 error (with iimRunner opened).

UPDATE:
I tried the same scripts in Windows XP and it run well.
So the problem may be related to Windows 10.
Any solution for windows 10?

I'll try in Windows 2008 R2 that will be my target OS and will post more information.

jairbj wrote:Hi friends, I installed my imacros enterprise trial in windows 10 and the script interface don't work.

I tried with the VBS and VB6 provided examples and both returns -1 in iimopen and iiminit.

The most crazy thing is that iMacros browser open and closes and it returns -1.

I tried the same examples in windows xp and windows 2008 and in both they works great.

ANY suggestions?

There is no need to kind of spam the Forum by opening 2 Threads in 2 different Sub-Forums about the same Problem (current Thread was just perfect, except that you didn't mention which Version of the iMacros Browser you are using...) (without mentioning the 3rd Thread in which you posted about again the same Pb, but that's OK)... :roll:
Last edited by chivracq on Tue Sep 15, 2015 6:04 pm, edited 1 time in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iimInit and iimOpen always return -1

by jairbj on Tue Sep 15, 2015 5:54 pm

chivracq wrote:There is no need to kind of spam the Forum by opening 2 Threads in 2 different Sub-Forums about the same Problem (current Thread was just perfect, except that you didn't mention which Version of the iMacros you are using...) (without mentioning the 3rd Thread in which you posted about again the same Pb, but that's OK)... :roll:


Hi friend, sorry for the misunderstanding.

I'm using the latest iMacros version 10.4.28.1074 x64.
jairbj
 
Posts: 6
Joined: Mon Sep 14, 2015 3:14 pm

Re: iimInit and iimOpen always return -1

by Tom, Tech Support on Wed Sep 16, 2015 2:33 am

jairbj wrote:I tried the same scripts in Windows XP and it run well.
So the problem may be related to Windows 10.
Any solution for windows 10?
Hi jairbj,

Our QA and development teams have not found any issues using the iMacros scripting interface on Windows 10 thus far.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: iimInit and iimOpen always return -1

by rezuke on Tue Oct 20, 2015 4:54 pm

I have the same issue when running it on windows server 2012. Can anyone please help me?
rezuke
 
Posts: 3
Joined: Tue Oct 20, 2015 9:53 am

Re: iimInit and iimOpen always return -1

by Tom, Tech Support on Wed Oct 21, 2015 5:59 am

For anyone encountering this problem, would you please let us know if you have any anti-virus/malware software running on the machine.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: iimInit and iimOpen always return -1

by hostile17 on Fri Feb 12, 2016 2:25 pm

So disappointing to see someone who needs help told off for - shock horror - posting twice.

However no help is provided... and a spam bot is allowed to spam and without comment is left there for over four months!
hostile17
 
Posts: 12
Joined: Thu Sep 20, 2007 7:08 am

Re: iimInit and iimOpen always return -1

by chivracq on Sat Feb 13, 2016 9:32 pm

hostile17 wrote:So disappointing to see someone who needs help told off for - shock horror - posting twice.

However no help is provided... and a spam bot is allowed to spam and without comment is left there for over four months!

Pfff...!, yep, nice talking for sbd who's been using iMacros for nearly 9 years and never bothered to answer one single Thread to help other Users and can't even follow up on his/her own Threads a bit neatly, like this Thread which has been waiting for more than 8 years for some Follow-up/mini-Thanks from you...! :roll:

Concerning Current Thread, yep, sorry, "spamming" the Forum by opening several identical Threads is not the way to use the (sorry: any) Forum correctly as Info in Replies then get scattered in different Threads and renders each Thread a bit useless for other Users with a similar Pb to follow...
And TechSupport replied twice in this Thread but OP didn't follow up...

So..., not sorry at all for "disappointing" you, come and join helping us answering Questions from other Users and you will get some joy in your Life... :idea: 8)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 4 guests

-->