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