Firstly, I'm new.
I'm scripting something that uses FORTRAN and need some help... I believe IF/THEN statements don't work properly here, so I'm forced to use "GoTo" statements.
**Goal**: I'm trying to create a script that repeats itself, then stops when it recognizes the end point. The end statement is "Waiting for Prompt: Default Portal:" Each time I run this, I want it to remove a random set of lines. I successfully got this to run a static 16 times, but wanted something more automated. The system I'm trying to run the script on is CLI based, if that helps.
**Problem**: It seems to get stuck in a loop, I think.
**Code**: See below...
*************************
rmvseconds:
.TransmitTerminalKey rcVtUpKey
.TransmitTerminalKey rcVtSelectKey
.TransmitTerminalKey rcVtRemoveKey
.Transmit CR
.StatusBar = ""
.Transmit "Y"
.StatusBar = ""
.Transmit CR
If .StatusBar = "Waiting for Prompt: Default Portal:" Then
GoTo ending
Else
GoTo rmvseconds:
ending:
.Transmit CR
.Transmit CR
End If
ErrorHandler:
Session.MsgBox Err.Description, vbExclamation + vbOKOnly
End Sub
********************
I'm scripting something that uses FORTRAN and need some help... I believe IF/THEN statements don't work properly here, so I'm forced to use "GoTo" statements.
**Goal**: I'm trying to create a script that repeats itself, then stops when it recognizes the end point. The end statement is "Waiting for Prompt: Default Portal:" Each time I run this, I want it to remove a random set of lines. I successfully got this to run a static 16 times, but wanted something more automated. The system I'm trying to run the script on is CLI based, if that helps.
**Problem**: It seems to get stuck in a loop, I think.
**Code**: See below...
*************************
rmvseconds:
.TransmitTerminalKey rcVtUpKey
.TransmitTerminalKey rcVtSelectKey
.TransmitTerminalKey rcVtRemoveKey
.Transmit CR
.StatusBar = ""
.Transmit "Y"
.StatusBar = ""
.Transmit CR
If .StatusBar = "Waiting for Prompt: Default Portal:" Then
GoTo ending
Else
GoTo rmvseconds:
ending:
.Transmit CR
.Transmit CR
End If
ErrorHandler:
Session.MsgBox Err.Description, vbExclamation + vbOKOnly
End Sub
********************