Suspends script execution until the host screen is ready for keyboard input and the cursor is at the specified location.
Parameters:
TimeoutValue - The number of seconds to wait before returning with a "session is busy" error code.
RowValue - Specifies the cursor row position in the host screen.
ColumnValue - Specifies the cursor column position is the host screen.
ExtraWaitVal - The number of milliseconds to validate for a keyboard unlocked status.
Returns:
0 for success; or a non-zero error code. See Error Codes for a complete listing of error code descriptions.
Remarks:
The EMWaitCursor function can be used to verify that a specific host screen is being displayed before continuing with script execution.
If ExtraWaitVal is a value in the range of of 1, 2, 3, … ,50 then script execution will be suspended until the host machine sends the specified number of screen writes containing the keyboard restore/unlock command.
If ExtraWaitVal is greater than 50 then script execution will be suspended until the specified number of milliseconds have transpired.
NOTE If
-1 is specified for the ExtraWaitVal
parameter, then the Speed Control setting in Options:Script
Host Properties will be used.
SEE How
to Use the Script Speed Control for more information.
Example 1:
EMWriteScreen "list", 19, 7
EMSendKey "@E"
ResultCode = EMWaitCursor( 10, 4, 16, 3 ) 'wait for 3 keyboard restores
If ( ResultCode != 0 ) Then
MsgBox "Timeout Error in Script!", 48
End If
Example 2: (Using Speed Control)
EMWriteScreen "list", 19, 7
EMSendKey "@E"
ResultCode = EMWaitCursor( -1 ) 'use Speed Control to determine script delay
If ( ResultCode != 0 ) Then
MsgBox "Timeout Error in Script!", 48
End If