Q_SENDKEY Function

RAMP-TS

Q_SENDKEY Function

Emulates the pressing of a key, the request is queued up and processed when the next screen arrives.

 

Syntax

Q_SENDKEY(argCondition,sKeyName, oPayload)

 

Parameters

argCondition

Optional. May be passed as:

  • null or "", indicating that no condition applies
  • "=<<screen name when the queued instruction is executed>>" indicating that the resulting SENDKEY/SETVALUE should only be performed if the next screen is as named.
  • "!=<<screen name when the queued instruction is executed>>" indicating that the resulting SENDKEY/SETVALUE should only be performed if the next screen is not as named.

The screen name condition is tested when the next or resulting screen arrives. The name specified does not have anything to do with the current screen name.

sKeyToSend

Required.String that contains the name of the key. See Function Key Names for SENDKEY Function.

oPayload

Optional. Object that is passed with the function.

 

 

Example

  Q_SENDKEY("",KeyF12);   /* Unconditionally send F12 aginst the resulting screen by queueing up the request */         

  SENDKEY(KeyEnter);      /* Send enter against the current screen */

 

Or

 

  Q_SENDKEY("=Confirm",KeyEnter);   /* If the resulting screen is named Confirm, send enter */

  Q_SENDKEY("!=Confirm",KeyF12);    /* else send F12                                       */         

  SENDKEY(KeyEnter);                /* Send enter against the current screen */

  

Also see SENDKEY Function