Language specific macro commands
Below is a list of all the Arabic language specific macro commands. In addition to these, you can use standard VBScript commands. A reference for the latter can be downloaded from Microsoft's web site.
IsFlippedField
The IsFlippedField() method checks whether the field specified by row/column position is flipped or not for the purpose of entering Arabic data in the correct direction.
Function Prototype
boolean IsFlippedField(short nRow, short nColumn)
Example
bRtn = HFDISPLAY.IsFlippedField (7, 53);
PushKey
The PushKey() method simulates a key input.
Function Prototype
BOOL PushKey(int nKey)
The PushKey() method is used to simulate a single key input to the host. A key is referred to by name. This method returns one of the following:
1. TRUE if the operation is successful
2. FALSE if the operation is not successful
The available keys are listed below (for both 5250 and 3270 together):
Arabic Delete_Right Latin PF5 PF21
Arabic_Close Dup LightPen_Selection PF6 PF22
Attention End NewLine PF7 PF23
Auto_Reverse Enter NumPad_Comma PF8 PF24
Backspace Erase_EOF NumPad_Dot PF9 Print
BackTab Erase_Input NumPad_Slash PF10 Reload
Base Field_Base NumPad_Star PF11 Reset
Calc_Rev_Mode Field_Exit PA1 PF12 Reverse_Push
Clear Field_Mark PA2 PF13 Screen_Direction
Cursor_Down Field_Minus PA3 PF14 System_Request
Cursor_Left Field_Plus Page_Down PF15 Tab
Cursor_Right FieldX Page_Up PF16 Test_Request
Cursor_Selection Help PF1 PF17 Toggle_RDE_RTE
Cursor_Up Hex_Mode PF2 PF18  
Delete_Char Home PF3 PF19  
Delete_Left Insert PF4 PF20  
Example
HFDISPLAY.PutField 6, 53, UserName
HFDISPLAY.PutField 7, 53, Password
HFDISPLAY.PushKey [ENTER]
In this example, the PushKey() method sends the [Enter] key to the host after the user provides a user name and password. An alternative to PushKey [ENTER] is as follows:
HFDISPLAY.PushKey 32778
The numeric code for the [Enter] key is 0x800A in hexadecimal or 32778 in decimal.
PushKeyStream
The PushKeyStream method simulates keystrokes on the keyboard with letters, numbers and function keys used on one screen all listed one after the other.
Function Prototype
HFDISPLAY.PushKeyStream "string<special key>"
Special keys should always be enclosed between <>. Normal text is typed as is. The whole stream will be enclosed between two double quotes.
This is the list of supported special keys that can be used by name:
Arabic Delete_Right Latin PF5 PF21
Arabic_Close Dup LightPen_Selection PF6 PF22
Attention End NewLine PF7 PF23
Auto_Reverse Enter NumPad_Comma PF8 PF24
Backspace Erase_EOF NumPad_Dot PF9 Print
BackTab Erase_Input NumPad_Slash PF10 Reload
Base Field_Base NumPad_Star PF11 Reset
Calc_Rev_Mode Field_Exit PA1 PF12 Reverse_Push
Clear Field_Mark PA2 PF13 Screen_Direction
Cursor_Down Field_Minus PA3 PF14 System_Request
Cursor_Left Field_Plus Page_Down PF15 Tab
Cursor_Right FieldX Page_Up PF16 Test_Request
Cursor_Selection Help PF1 PF17 Toggle_RDE_RTE
Cursor_Up Hex_Mode PF2 PF18  
Delete_Char Home PF3 PF19  
Delete_Left Insert PF4 PF20  
Example
HFDISPLAY.PushKeyStream GUEST<TAB>FARABI<ENTER>
This macro assumes the cursor is at the correct position where the username should be entered and that the password field is one TAB move away. In this example we used values directly. In order to use variables, you need to separate the variables from the other keys using simple concatenation as in the following example:
HFDISPLAY.PushKeyStream Username+<TAB>+Password+<ENTER>
ReceiveIndFile
The ReceiveIndFile() method performs an IND$FILE command to transfer a file from the mainframe. For further details, refer to your IND$FILE documentation. This command works only with HostFront for the Mainframe.
Function Prototype
INT ReceiveIndFile (Str MainframeFile, Str PCFile, Str FTOptions, Int Flags)
Parameters
Mainframe File The full name and path of the file on the mainframe
PCFile The path and name of the target file on the PC or local network.
FTOptions Is a string defining additional command option for IND$FILE file transfer. For example, you can use "ASCII CRLF" for TSO environment.
Flags A total of fixed values defining additional options for the file transfer. There are five groups of values. You have to use one value from each group. The groups are listed below:
  Group 1: Environment Type TSO = 0
CMS = 16 '0x0010
CICS = 32 '0x0020
  Group 2: Conversion Type WINDOW_ANSI = 0
DOS_ASCII = 256 '0x0100
BINARY = 512 '0x0200
  Group 3: Over-write/Append OVERWRITEFILE = 0
APPENDFILE = 4096 '0x1000
  Group 4: Prompt Completion NOTSHOWMSGBOX = 0
SHOWMSGBOX = 16384 '0X4000
  Group 5: RTL Flipping (Arabic) NOTFLIP_ARABICDATA = 0
FLIP_ARABICDATA = 8192 '0x2000
Example
HFDisplay.ReceiveIndFile "test(aaa)", "C:\public\ft\aaa.txt", "ASCII CRLF", 16384
SendIndFile
The SendIndFile() method performs an IND$FILE command to transfer a file to the mainframe. For further details, refer to your IND$FILE documentation. This command works only with HostFront for the Mainframe.
Function Prototype
INT SendIndFile (Str MainframeFile, Str PCFile, Str FTOptions, Int Flags)
Parameters
Mainframe File The full name and path of the file on the mainframe
PCFile The path and name of the target file on the PC or local network.
FTOptions Is a string defining additional command option for IND$FILE file transfer. For example, you can use "ASCII CRLF" for TSO environment.
Flags A total of fixed values defining additional options for the file transfer. There are five groups of values. You have to use one value from each group. The groups are listed below:
  Group 1: Environment Type TSO = 0
CMS = 16 '0x0010
CICS = 32 '0x0020
  Group 2: Conversion Type WINDOW_ANSI = 0
DOS_ASCII = 256 '0x0100
BINARY = 512 '0x0200
  Group 3: Over-write/Append OVERWRITEFILE = 0
APPENDFILE = 4096 '0x1000
  Group 4: Prompt Completion NOTSHOWMSGBOX = 0
SHOWMSGBOX = 16384 '0X4000
  Group 5: RTL Flipping (Arabic) NOTFLIP_ARABICDATA = 0
FLIP_ARABICDATA = 8192 '0x2000
Example
HFDisplay.SendIndFile "test(aaa)", "C:\public\ft\aaa.txt", "ASCII CRLF", 16384