Strange Formular for OLE

G

Guest

Hello,

I like to fill in fields in a UTS60 terminal emulation. (Unisys-Host).
The terminal software is Attachemate INFOConnect. The manual says, that you
can get an OLE as formular for Excel to read the data from the terminal
software.

Following formular reads, actively updating itself, a specified area from
the terminal software's screen. If I type characters into that area inside
the terminal software, excel gets updated.

=Accmgr.Session.1|'C:\INFOCN32\ACCMGR32\Integration_64.ADP'!\R3C24R3C35M1Page001

Description:
- Accmgr.Session.1
is a key in windows.registry for file extensen ADP. ADP is the file
extension for attachemate terminal sessions und points to accmgr32.exe.
accmgr32.exe accepts 1 argument/parameter. If called with
C:\INFOCN32\ACCMGR32\Integration_64.ADP, the terminal emulation opens
automaticaly the session, see below

- C:\INFOCN32\ACCMGR32\Integration_64.ADP
is a valid terminal session configuration file

- R3C24R3C35
describs the read area (from row 3, col 24 til row 3, col 35

- M1
seems to be static

- Page001
is a "recorded" screen inside the terminal emulation


How can I use this information to create OLE or ActiveX objects to read
values from the screen once, write them into a file and destroy the allocated
objects?

Does anyone have another idea how to automatically read and write from/to
UTS60 connections? (HLLAPI, OHIO)

Thanks in advance!

Bjoern
 
N

NickHK

Bjoern,
I don't know this software, but if it exposes any creatable ActiveX objects,
you will find them in the list in the VB editor under Tools>References (and
possibly Browse).
If you can set a reference to a suitable component, then you can see its
various properties/methods etc in the Object Browser.

If it supports events, you can get notification by declaring the variable
suitably:
Dim WithEvents MySession As <ComponentName>

Or could evaluate the current function in VBA. How you log the data will
depend somewhat on what is returned from the call to "Accmgr.Session.1", but
something like this:

Private Sub CommandButton1_Click()
MsgBox LogSessionData("C:\LogData.txt", "R3C24R3C35")
End Sub


Private Function LogSessionData(TextFile As String, _
Optional SeesionRange As String, _
Optional ConfigFile As String =
"C:\INFOCN32\ACCMGR32\Integration_64.ADP", _
Optional StaticVal As String = "M1", _
Optional PageNum As String = "Page001") As
Boolean

Dim FileNum As Long
Dim ConnStr As String
Dim RetVal As Variant

Const BaseStr As String =
"=Accmgr.Session.1|'<ConfigFile>'!\<SessionRange><StaticVal><PageNum>"

ConnStr = Replace(BaseStr, "<ConfigFile>", ConfigFile)
ConnStr = Replace(ConnStr, "<SessionRange>", SessionRange)
ConnStr = Replace(ConnStr, "<StaticVal>", StaticVal)
ConnStr = Replace(ConnStr, "<PageNum>", PageNum)

RetVal = Evaluate(ConnStr)

If IsEmpty(RetVal) = False Then
FileNum = FreeFile

Open TextFile For Append As #FileNum
Put #FileNum, , RetVal '<<<
Close #FileNum
LogSessionData = True
Else
'No data ?
LogSessionData = False
End If

End Function

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top