Jump to content

Com Return Variable


cp1983
 Share

Recommended Posts

Hi,

I'm trying to use a com object to get some information from a program that is running. I am able to use AutoIt to control the program via the com object.

Dim $PlotManObject = ObjCreate("Pmhost.PlotMgrCtrl")
$PlotManObject.SendCommand(0,"AddGroup", "Test123", "D:\Header.jhf", " ", " ", " ", " ", " ", 1308265)

However to get the information from the program I have to use:

Dim $return2
Dim $PlotManObject = ObjCreate("Pmhost.PlotMgrCtrl")
$PlotManObject.GetStatus(0,"GetProjectTreeText","1;1","",$return2,1308265)
MsgBox(0,"",$return2)

This should give me a string in $return2

It works i VBA with this code:

Set pmc = CreateObject("Pmhost.PlotMgrCtrl.1")
Dim rResult As Variant
Dim lRet As Long
pmc.GetStatus 0, "GetProjectTreeText", "1;1", "", rResult, VarPtr(lRet)
MsgBox rResult

I just can't figure out whay AutoIt won't return the string for me? Does anyone know?

Regards,

Christian

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...