cp1983 Posted October 4, 2009 Share Posted October 4, 2009 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 More sharing options...
Richard Robertson Posted October 5, 2009 Share Posted October 5, 2009 AutoIt doesn't work with reference parameters in COM yet. It's a problem that's been around a while, sorry. Link to comment Share on other sites More sharing options...
cp1983 Posted October 5, 2009 Author Share Posted October 5, 2009 Hi, Thanks for the reply. I will then write a COM for my COM to handle it Regards, Christian Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 6, 2009 Share Posted October 6, 2009 Good luck. Just make sure your COM functions don't have reference parameters. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now