Wait for the cursor to appear at the specified screen position. Although this may work for VT emulation, may not make sense since VT is character based. Recommended to use WaitForCursorColumn instead.


FlexScreen.WaitForCursor(Position, [WaitMSec])



Integer, input

Integer value of the zero based ending screen position, which may be obtained by using the FlexScreen.Position method.


Integer, input, optional

Number of milliseconds before the wait method will timeout.


If the optional WaitMSec parameter is specified, it will be used as the maximum wait time before a timeout error occurs. If unspecified, FlexScreen.WaitTimeoutMSec will be used instead.

When a timeout occurs, a run time error will be generated and the macro will stop unless On Error Resume Next is in effect, in which case, WaitForCursor will return a false value.


Sub Main()

  Ok = FlexScreen.WaitForCursor(FlexScreen.Position(10, 11))

  Ok = FlexScreen.SendKeys("MyUserID")

  Ok = FlexScreen.SendKeys(FlexKey.ENTER)

End Sub