VB WaitforString hangs up.
Just wondering how to check the condition of a waitforstring to determine when to skip the existing record and jump to another.
The problem is when an invalid entry in the process is entered the session awaits a different response from the user. I am modifying this Reflection macro to pull the data from text file.
However, when the session hangs up due to the invalid entry, I can't find where to capture the wait state of the session or the value of any object that will help me bypass the incorrect record and to continue processing the next record in the file.
Here is the part where the process hangs up:
' Generated by the Reflection Macro Recorder on 04-11-2008 06:12:00.81.
' Generated by Reflection for UNIX and Digital 7.00.
On Error GoTo ErrorHandler
Const NEVER_TIME_OUT = 0
Dim LF As String ' Chr$(rcLF) = Chr$(10) = Control-J
Dim CR As String ' Chr$(rcCR) = Chr$(13) = Control-M
LF = Chr$(rcLF)
CR = Chr$(rcCR)
'DECLARE MY VARIABLES
Dim sRecId As String
Dim sMediaType As String
Dim sVarIn As String
iVarIn = FreeFile
'OPEN INPUT SOURCE
Open "C:\Test.txt" For Input As #iVarIn
'BEGIN REFLECTION PROCESS
Do While Not EOF(iVarIn)
Input #iVarIn, sRecId, sVarIn, sMediaType
.WaitForString "", NEVER_TIME_OUT, rcAllowKeystrokes
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Display Modes||Rate This Thread|