The AutEclFieldList.Count returns a 1 instead of the number of fields on the screen. This is happening in a collegues session. In my own session i receive the number 122 which seems to be correct on the total of labels and datafields.
We both have Version 12.0 with 20170427 S - 12.0.2.0 I've already set my HostCodePage to '500 Belgium MNCS' like his but it still works on my pc.
I'm comparing the mainframe settings of the 2 sessions but cant find things that make a difference.
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
Dim NumFields
Dim TextStr
Dim autECLPSObj
Dim autECLConnList
Dim ObjCtrlC
Set autECLPSObj = CreateObject("PCOMM.autECLPS")
Set autECLConnList = CreateObject("PCOMM.autECLConnList")
autECLPSObj.SetConnectionByHandle(autECLConnList(1).Handle)
autECLPSObj.autECLFieldList.Refresh
NumFields = autECLPSObj.autECLFieldList.Count
MsgBox "Numfields : " & NumFields
try specific the exact session name instead of floating number, and try to run through the automation once after each Hub Restarts. I've had similar bugs where one session didn't work and the other works within my same PC. I believe it's a HUB thing connection / session rather than coding... still haven't figure out why. It fails on the first time of almost every new Hub session.