Question : Controlling RUMBA from Access VBA

Hi,
Having done many searches over the net, i believe my subject matter is pretty uncommon. However....

I am attempting to carry out RUMBA screen entry from the data within Access (screen scraping). Common actions that i would be performing would be to
1. Input data in specific areas on a RUMBA session
2. Read data in specific areas from a RUMBA session

I currently perfrom this by using RUMBA's built in Script editor which allows VB style code to be developed to perfrom various RUMBA actions. The script is .CSF file.
Typically i save data from Access into a text file, and then have RUMBA's script read the text file, then read/write data to it's RUMBA screen.

Whilst this works fine, it is not exactly a quick way of providing new solutions - so I have been wondering if there is a better alternative.

On investigation, in VBA References I have found RumbaScript AT 1.0 Type Library, so i have selected it. In Object Browser the library name is RUMBSCRIPTATLIB and contains the following classes:
Area
Connectivity
Cursor
FileTransfer
HostOptions
OlAobj
Screen
Session
Sessions
System
TelnetSetup
Waits

Each class contains several members - the members that seem to fit my requirements are in the Screen class...
-Sub MoveTo(row as Long, col as Long,[Page])
-Sub PutString(String as String, [row], [col], [Page])
-Function GetString(row as Long, col as Long, length as Long) as String

My problem is that i don't really know how to start my code to set up the object and to refer to the ActiveSession.

Other members that may be of interest include.

System.ActiveSession
System.Application
Session.Application

Any suggestions are welcome, however do not wish to use screen scraping software. Thanks all.

Answer : Controlling RUMBA from Access VBA

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
' HLLAPI FUNCTION DECLARATIONS
Private Declare Function WD_AdviseHostUpdate Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal hInstanceMsg As Integer, ByVal Msg As Integer) As Integer
Private Declare Function WD_ConnectPS Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_Convert Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal ConvertType As Integer, RowCol As RowCol, ByVal ShortName As String) As Integer
Private Declare Function WD_CopyFieldToString Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal Position As Integer, ByVal Buffer As String, ByVal Length As Integer) As Integer
Private Declare Function WD_CopyOIA Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal OIAData As String, ByVal Length As Integer) As Integer
Private Declare Function WD_CopyPS Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal Buffer As String, ByVal Length As Integer) As Integer
Private Declare Function WD_CopyPSToString Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal Position As Integer, ByVal Buffer As String, ByVal Length As Integer) As Integer
Private Declare Function WD_CopyStringToField Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal Position As Integer, ByVal Buffer As String) As Integer
Private Declare Function WD_CopyStringToPS Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal Position As Integer, ByVal Buffer As String, ByVal Length As Integer) As Integer
Private Declare Function WD_DeletePS Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_DisconnectPS Lib "EhlApi32.dll" (ByVal hInstance As Integer) As Integer
Private Declare Function WD_DisplayCursor Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal Position As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_DisplayPS Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_FindFieldLength Lib "EhlApi32.dll" (ByVal hInstance As Integer, Length As Long, ByVal Position As Integer, ByVal FindData As String) As Integer
Private Declare Function WD_FindFieldPosition Lib "EhlApi32.dll" (ByVal hInstance As Integer, Location As Integer, ByVal Position As Integer, ByVal FindData As String) As Integer
Private Declare Function WD_GetKey Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal GetKeyData As String) As Integer
Private Declare Function WD_GetSessionHWND Lib "EhlApi32.dll" (ByVal hInstance As Integer) As Integer
Private Declare Function WD_Pause Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal Length As Integer) As Integer
Private Declare Function WD_PostInterceptStatus Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_QueryCursorLocation Lib "EhlApi32.dll" (ByVal hInstance As Integer, Location As Integer) As Integer
Private Declare Function WD_QueryFieldAttribute Lib "EhlApi32.dll" (ByVal hInstance As Integer, iAttribute As Integer, ByVal Position As Integer) As Integer
Private Declare Function WD_QueryHostUpdate Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_QuerySessionStatus Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal SessionData As String) As Integer
Private Declare Function WD_QuerySystem Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal SystemData As String) As Integer
Private Declare Function WD_ReceiveFile Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal TransferData As String) As Integer
Private Declare Function WD_Release Lib "EhlApi32.dll" (ByVal hInstance As Integer) As Integer
Private Declare Function WD_Reserve Lib "EhlApi32.dll" (ByVal hInstance As Integer) As Integer
Private Declare Function WD_ResetSystem Lib "EhlApi32.dll" (ByVal hInstance As Integer) As Integer
Private Declare Function WD_RunMacro Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal Buffer As String) As Integer
Private Declare Function WD_RunProfile Lib "EhlApi32.dll" (ByVal Profile As String, ByVal SW_Value As Integer) As Integer
Private Declare Function WD_SearchField Lib "EhlApi32.dll" (ByVal hInstance As Integer, Location As Integer, ByVal Position As Integer, ByVal Buffer As String) As Integer
Private Declare Function WD_SearchPS Lib "EhlApi32.dll" (ByVal hInstance As Integer, Location As Integer, ByVal Position As Integer, ByVal SearchData As String) As Integer
Private Declare Function WD_SendFile Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal TransferData As String) As Integer
 
'Private Declare Function WD_Sendkey Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal KeyData As String) As Integer
Private Declare Function WD_Sendkey Lib "Eehllapi.dll" (ByVal hInstance As Integer, ByVal KeyData As String) As Integer
 
Private Declare Function WD_SetCursor Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal Position As Integer) As Integer
Private Declare Function WD_SetSessionParameters Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal SSPData As Long) As Integer
Private Declare Function WD_ShowSession Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal ShowWindow As Integer) As Integer
Private Declare Function WD_StartHostNotification Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal NotifyData As String) As Integer
Private Declare Function WD_StartKeystrokeIntercept Lib "EhlApi32.dll" Alias "WD_StartKSIntercept" (ByVal hInstance As Integer, ByVal SKIData As String) As Integer
Private Declare Function WD_StopHostNotification Lib "EhlApi32.dll" (ByVal hInstance As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_StopKeystrokeIntercept Lib "EhlApi32.dll" Alias "WD_StopKSIntercept" (ByVal hInstance As Integer, ByVal ShortName As String) As Integer
Private Declare Function WD_Wait Lib "EhlApi32.dll" (ByVal hInstance As Integer) As Integer
Open in New Window Select All
Random Solutions  
 
programming4us programming4us