Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-17-2008, 11:27 AM
M3J5 M3J5 is offline
Registered User
 
Join Date: Apr 2008
Location: Puerto Rico
Posts: 1
Question 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:

Sub Edit2005()
' 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
With Session
Do While Not EOF(iVarIn)
Input #iVarIn, sRecId, sVarIn, sMediaType
.Transmit sRecId
.TransmitTerminalKey rcVtEnterKey
.WaitForString "", NEVER_TIME_OUT, rcAllowKeystrokes
Loop
End Sub



Any Suggestions?
Reply With Quote
  #2  
Old 04-17-2008, 03:00 PM
kbarnette kbarnette is offline
VanDyke Technical Support
 
Join Date: Aug 2007
Posts: 587
Hi M3J5,

What VanDyke product is it that you are using?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:56 AM.