Page History
This example shows how to match function key descriptions on 5250 screens:
With RAMP buttons and function keys
This example uses JavaScript function SHARED.apply5250FunctionKeyPatterns which is designed to look for Fn=xxxxxx patterns on specified screen lines and then use these patterns to condition the RAMP-TS buttons and function keys to match.
Note that the matching does not include the text portion of the pattern. Normally in RAMP-TS the button captions are defined independently of the 5250 screen in RAMP-Tools.
To try out this example, copy and paste the functions in SHARED.apply5250FunctionKeyPatterns into your SHARED script object, file UF_SY420_RTS.JS. The logic in the functions is:
...
Start Line Number | Mandatory. Integer. The first line to be searched for Fn=xxxx patterns. | ||
|---|---|---|---|
End Line Number | Optional. Integer. The last line to be searched for Fn=xxxxx patterns. The default value is the same value as the start line number. | ||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="483386d5-7ce9-4f1d-9a9e-f7e5227f48bf"><ac:plain-text-body><![CDATA[ | Keys/Buttons to always be enabled | Optional. Array of function key identifiers. For example [KeyEnter,KeyF11] | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="394ef593-e8d0-4170-a5e1-73cce0867108"><ac:plain-text-body><![CDATA[ | Keys /Buttons to always be disabled. | Optional. Array of function key identifiers. For example [ KeyF12, KeyF3 ] | ]]></ac:plain-text-body></ac:structured-macro> |
| Wiki Markup |
|---|
|
For example:
SHARED.apply5250FunctionKeyPatterns(22, 23, \[KeyEnter,KeyF1\], \[KeyF12\] );
says to check screen lines 22 to 23, always enable Enter and F1, and always disable F12.
If you wanted to unconditionally enable the page up and down keys, which will not have matching text patterns to enable them you would do this:
SHARED.apply5250FunctionKeyPatterns(22, 23, \[ KeyPageUp, KeyPageDown \] );
You could also do this permanently in the SHARED function.
Also see [<span style="color: #0000ee"><span style="text-decoration: underline; ">Questions about the Function</span></span>|lansa050_1650.htm#_Ref247103940].
[<span style="color: #0000ee"><span style="text-decoration: underline; ">Show Contents List</span></span>|../../index.htm#lansa/lansa050_1365.htm] |
