Script Functions

RAMP-NL

Script Functions


This section describes the shipped RAMP JavaScript functions you can use in your scripts.

Note that these functions are case sensitive, so be careful to use exactly the same case as shown when writing scripts.

Get and Set Values of fields on RAMP Screens

Set a field on a RAMP screen to a value 

SETVALUE Function

Get the value from a field on a RAMP screen

GETVALUE Function

Screen Functions

Emulate pressing a key.

SENDKEY Function

Check that RAMP is showing a screen

CHECK_CURRENT_FORM Function

Signal to the Framework to close the current screen 

AVCLOSEFORM Function

Hide the current screen with an optional message

HIDE_CURRENT_FORM Function

Get the Form Name of the current RAMP screen

CURRENT_FORM Function

Position the cursor in a given row and column of the screen 

SETCURSOR Function

Searches the label fields on the form for a menu option by name

GET_MENU_OPTION_NUMBER Function

Function keys to send when an unknown form appears during RAMP navigation

ADD_UNKNOWN_FORM_GUESS Function

Overcome problem of a pop-up which is invoked from a button click or function key press in a destination screen being hidden behind the main screen

FORCE_POPUP_REFRESH Function

Set the current command handler caption to a new value

SET_HANDLER_CAPTION Function

Dynamically enable or disable a Destination’s button or 5250 function key

SETKEYENABLED Function

Message Functions

Issue a message as an alert

ALERT_MESSAGE Function

Clear all messages currently in the stack 

CLEAR_MESSAGES Function

Issue a fatal message

FATAL_MESSAGE Function

Issue a message

MESSAGE Function

Stop the Framework from shutting down when a fatal navigation error occurs

FATAL_MESSAGE_TYPE Function

Other Functions

Signal an event to filters and RAMP screens 

AVSIGNALEVENT Function

Add run time information to the trace panel 

TRACE Function

Run a newlook Macro

RUNMACRO Function

Navigate to a Junction screen

NAVIGATE_TO_JUNCTION Function

Show a user defined prompter form for a field

HANDLE_PROMPT Function

Navigate to a Destination screen 

NAVIGATE_TO_DESTINATION Function

Navigate to a previously shown Destination screen 

NAVIGATE_TO_PREV_DESTINATION Function

Returns the leading numbers from a string

STRIP_LEADING_NUMBERS Function

Defines a string by a unique number for use by other scripts

ADD_STRING Function

Sets the message to show when the Framework locks up

SET_LOCK_MESSAGE Function

Returns the string for a given string identification number

STRING Function

Call this function to override the Lock Framework when unknown 5250 form is displayed session property

SET_UNKNOWN_LOCKING Function

Set the focus to a field on the current screen

SETFOCUS Function

Get the name of the field with focus on the current screen

GETFOCUS Function

Return a DataGrid as a string

MAKESUBFILEINTOSTRING Function

newlook Function Key Bar Functions

Causes all screens not defined to RAMP to show the newlook toolbar buttons

OVERRIDE_BUTTONS_UNDEFINED_SCREENS Function

Multilingual Caption Functions

Assigns a new caption for a function key on a particular screen

OVERRIDE_KEY_CAPTION_SCREEN Function

Assigns a new caption for a function key on any screen

OVERRIDE_KEY_CAPTION_ALL Function

Virtual Clipboard Access Functions

Save an alphanumeric or numeric value in the Framework virtual clipboard.

AVSAVEVALUE Function

Restores an alphanumeric or numeric value from the Framework virtual clipboard

AVRESTOREAVALUE and AVRESTORENVALUE Function

Real Clipboard Access Functions

Copy a string to the user's clipboard

COPYTOCLIPBOARD Function