Blue_Drache Posted May 11, 2005 Share Posted May 11, 2005 Ok, our AS400 emulators can use a VB6 style interface and allow for direct manipulation using VB6 and certian DLL files. I'm not here to ask about DLLCall() just yet, but I'm wondering if the COM functions work in similar context to the VB6 style of coding. Example, after the references are set, we interface with the emulators via: CODE'--------PCommC Info---------Global PS(1 To 6) As AutPSGlobal IA(1 To 6) As AutOIAGlobal PSa As AutPSGlobal PSb As AutPSGlobal PSc As AutPSGlobal PSd As AutPSGlobal PSe As AutPSGlobal PSf As AutPSGlobal IAa As AutOIAGlobal IAb As AutOIAGlobal IAc As AutOIAGlobal IAd As AutOIAGlobal IAe As AutOIAGlobal IAf As AutOIAGlobal i01 As IntegerGlobal i02 As IntegerGlobal SessionList As New AutConnListGlobal TotalInfoFunction PcommC()On Error Resume NextDoEventsDim ConLetter(1 To 6)ConLetter(1) = "A"ConLetter(2) = "B"ConLetter(3) = "C"ConLetter(4) = "D"ConLetter(5) = "E"ConLetter(6) = "F"For i01 = 1 To 6Set IA(i01) = CreateObject("PCOMM.autECLOIA")Set PS(i01) = CreateObject("PCOMM.autECLPS")Next i01Set SessionList = New AutConnListFor i02 = 1 To SessionList.CountPS(i02).SetConnectionByName (ConLetter(i02))IA(i02).SetConnectionByName (ConLetter(i02))Next i02Set IAa = CreateObject("PCOMM.autECLOIA")Set PSa = CreateObject("PCOMM.autECLPS")Set IAb = CreateObject("PCOMM.autECLOIA")Set PSb = CreateObject("PCOMM.autECLPS")Set IAc = CreateObject("PCOMM.autECLOIA")Set PSc = CreateObject("PCOMM.autECLPS")Set IAd = CreateObject("PCOMM.autECLOIA")Set PSd = CreateObject("PCOMM.autECLPS")Set IAe = CreateObject("PCOMM.autECLOIA")Set PSe = CreateObject("PCOMM.autECLPS")Set IAf = CreateObject("PCOMM.autECLOIA")Set PSf = CreateObject("PCOMM.autECLPS")IAa.SetConnectionByName ("A")PSa.SetConnectionByName ("A")IAb.SetConnectionByName ("B")PSb.SetConnectionByName ("B")IAc.SetConnectionByName ("C")PSc.SetConnectionByName ("C")IAd.SetConnectionByName ("D")PSd.SetConnectionByName ("D")IAe.SetConnectionByName ("E")PSe.SetConnectionByName ("E")IAf.SetConnectionByName ("F")PSf.SetConnectionByName ("F")End FunctionIf we wanted to interface with the "C" emulator, we'd create a line saying:PS(3).<command> "<whatever>"Example:PS(3).GetText([3], [2], [20]) = X Row, Col, LenFrom what I've seen of COM, it funtions in a similar fasion, no? Since these emulators have a built in VB interface, I could dig into it with AutoIt, right?I would use$oPCOMM.autECLPS.GetText = ??? Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
SvenP Posted May 11, 2005 Share Posted May 11, 2005 Ok, our AS400 emulators can use a VB6 style interface and allow for direct manipulation using VB6 and certian DLL files. I'm not here to ask about DLLCall() just yet, but I'm wondering if the COM functions work in similar context to the VB6 style of coding. ...From what I've seen of COM, it funtions in a similar fasion, no? Since these emulators have a built in VB interface, I could dig into it with AutoIt, right?I would use$oPCOMM.autECLPS.GetText = ???<{POST_SNAPBACK}>Hello Blue_Drache,I am not familiar with AS/400 emulators, but I can point you at some limitations in AutoIt3:1. Your code example uses arrays containing objects. AutoIt3 accepts these kind of arrays also, but you can't do direct COM calls using the array elements.So a line like: PS(3).<command> "<whatever>" would have to be split into:$objectPS = PS(3)$objectPS.<command>("<whatever>")2. In your code example I saw also line with: Set SessionList = New AutConnListThese kind of things are also not possible in AutoIt3 script. You have to search for the declaration of 'AutConnList' and find a different way to retrieve a SessionList.3. The VB-syntax has to be rewritten into AutoIt3 syntax. Like array elements in brackets [] instead of parentheses (), removing the 'Set' keywords, etc. etc.I hope this helps you a bit in the right direction.Regards,-Sven 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