As Michael mentioned earlier, WaitForString (as well as ProcessDatacomm) is for the VT/6530 emulators (.ZVT/.Z65) not for Mainframe (.ZMD).
In this case you could use WaitCursor since you are looking for the <Esc>[22;1H sequence which moves the cursor to 22,1.
//Timeout, Row, Column, Extrawait
Host.WaitCursor(5, 22,1, 0)
btw, WaitForText will only scan for visible text on the screen. The MF emulator does not support scanning the datastream in any of the methods.
------------------------------
Mike Jones
Rocket Internal - All Brands
------------------------------
Original Message:
Sent: 11-01-2021 18:42
From: David Hatcher
Subject: VBA Scripting on BlueZone Emulator
Hi Mike.
This is a very basic script. It connects and presses cursor down once. Just waiting to verify it happened before proceeding.
I've attempted to add processdatacomm.
It throws an error as follows.
Exception thrown: 'System.MissingMemberException' in Microsoft.VisualBasic.dll
An unhandled exception of type 'System.MissingMemberException' occurred in Microsoft.VisualBasic.dll
Public member 'ProcessDataComm' on type 'IWhllObj' not found.
Doesn't look like its part of the dll file. Any examples?
'ConnectSessionID = Form1.TxtSessionID.Text If SessionID = "" Then Throw New ArgumentException("Invalid Session ID") End If Host = CreateObject("BZWHLL.WhllObj") Host.OpenSession(0, 2, "System2.Zmd", 30, 1) ResultCode = Host.Connect(UCase(SessionID)) If ResultCode <> 0 Then Throw New ArgumentException("Unable to Connect") End If'Actual code Dim Test As String = Nothing Console.WriteLine("Started") Host.SendKey("<CursorDown>") Host.ProcessDataComm = False Test = Host.WaitForString("[K" & Chr(27) & "[22;1H", "5") Console.WriteLine(Test) Host.ProcessDataComm = True'Disconnect Host.Disconnect Host.CloseSession(0, 1)
------------------------------
David Hatcher
Rocket Forum Shared Account
Original Message:
Sent: 11-01-2021 09:28
From: Mike Jones
Subject: VBA Scripting on BlueZone Emulator
David,
If I remember correctly there is a property called ProcessDatacomm that needs to be set to false or 0 before using WaitForString from VS projects (not BZ/RTE VBA or BBS scripts). This stops the emulator from processing data from the host unless driven by a COM call like WaitForString, Wait(s), SendKeys, etc...
------------------------------
Mike Jones
Rocket Internal - All Brands
Original Message:
Sent: 10-29-2021 17:12
From: David Hatcher
Subject: VBA Scripting on BlueZone Emulator
Hi Leslie,
I am also having the same issue with Visual Studio. I can easily get excel VBA to work though. Its like the parameters change when using Visual Basic .Net.
Where are you coding from?
------------------------------
David Hatcher
Rocket Forum Shared Account
Original Message:
Sent: 10-29-2021 02:10
From: Leslie Lau
Subject: VBA Scripting on BlueZone Emulator
Hi All,
I'm scripting with VBA for BlueZone and realised that WaitForString function isn't working.
Does anyone have met the same issue and found a solution to it?
Thanks
------------------------------
Leslie Lau
Payment Officer
Skandinaviska Enskilda Banken AB (publ)
Singapore Singapore
------------------------------