Using an ActiveX Display Session
Version 8.0.5
This Help file describes the ActiveX Display control user interface and lists its features.
HostFront for the AS/400
delivers true 5250 display emulation over the Internet or on an intranet by downloading an ActiveX control via HTTP or TCP/IP.From the Internet Explorer Web browser, which supports ActiveX controls, users can request one or more Display sessions. Each session appears in a separate browser window. When the user closes the session, the control is automatically removed from the user PC desktop, freeing up resources for other applications.
The ActiveX Display control features an intuitive user interface that has functions and interactions associated with 5250 terminal "green screens." The ActiveX Display control also provides access to 5250 functions, such as Enter and Function keys, directly from the keyboard.
ActiveX Display Control Features
The ActiveX Display control includes all the standard features of an IBM 5250 terminal plus additional ones that are only possible within a PC environment.
Persistent Connection |
A client can establish a TCP/IP connection to HostFront Server. |
Non-persistent Connection |
A client can establish an HTTP connection to HostFront Server. |
HotSpot |
You can configure your mouse to select AS/400 menu items or launch function-key commands on your AS/400 application screen. |
Type Ahead |
When the Input Inhibited status indicator appears, HostFront stores the next 256 keystrokes in memory (default). You can change this amount in the Data Transfer tab of the ActiveX Display Properties dialog box. For more information, see Modifying your Data Processing Properties below. Once you re-enable your input status, the AS/400 processes the stored keystrokes normally. |
System Function Keys |
The traditional function keys of a 5250 terminal are mapped to their respective keys on the PC keyboard. For example:
The remaining 5250 function keys are mapped to combination keys on the PC keyboard. Click the Keyboard Mapping |
Local Print Screen |
You can print the contents of your Display control using your Web browser, OLE application, or a custom application. |
OLE-compliant object |
You can insert the ActiveX Display control as an OLE object into any OLE-compliant application, such as Microsoft Word or Excel, allowing you to connect to the AS/400 without having to launch Internet Explorer. |
One session per browser |
An ActiveX Display occupies one instance of Internet Explorer allowing you to open multiple Display sessions. |
Local color mapping and font selection |
You can select the attribute color for each element in the ActiveX Display control. You can choose any of the standard Microsoft Windows' colors or assign a desktop attribute to a 5250 Display session attribute to obtain a consistent look and feel with your desktop. You can also select the font, font style, and font size for your Display session. |
GUI Transform |
Allows you to change the flat appearance of the traditional green screen to a graphical user interface |
Copy/Paste |
Allows you to copy and paste fields from a Display screen into a spreadsheet program. |
Dynamic font and window resizing |
The session window of the ActiveX Display control automatically occupies the entire window area of Internet Explorer and can resize the font to match the available area. Resize the font using the Increase Font Size |
Starting an ActiveX Display Control
Once you start your ActiveX Display control, you can customize it to suit your needs. The Display control allows you to:
These instructions assume that you have already connected to the Web Server.
To start the ActiveX Display control, follow these steps:
Note:
The HostFront Server Signon dialog box is not the AS/400 Sign on screen. It allows users to access HostFront only. Sign on to the AS/400 using a traditional AS/400 Sign on screen that opens later.If the user name or the password is incorrect, the HostFront Server Signon dialog box reopens. If you close the HostFront Server Signon dialog box without entering a valid user name and password, the Connect button will be dimmed.
You need to click the Signon button again to obtain the HostFront Server Signon dialog box and enter a valid user name and password.
To change your password, follow these steps:
You have successfully changed your password. The next time you sign on to HostFront Server, you must use your new password.
You can launch as many Display sessions as the session limit allows. The session limit is defined in your client configuration or by the maximum number of concurrent sessions allowed by HostFront, whichever limit you reach first.
Note:
Do not use the RefreshThis button provides you with information on:
You should always log off from the AS/400 and disconnect the session before you close your Display session. This prevents leaving the host session in an unresolved state. Click the Disconnect button to disconnect the Display session.
(You will not be able to toggle it off from the ActiveX Display window.)
Reading the ActiveX Display Status Line
Information about the current session appears in the status line of the ActiveX Display control. It provides the same information normally provided by IBM 5250 display terminals.
Rxx
(Row Indicator): indicates the row position of the cursor. The valid row positions are 1 to 38. Therefore, R6 means the cursor is currently located on row 6.Cxxx
(Column Indicator): indicates the column position of the cursor. The valid column positions are 1 to 132. Therefore, C53 means the cursor is currently located on column 53.SA
(System Available): indicates the AS/400 is available.MSG
(Message Waiting): indicates the AS/400 has one or more messages for you.II
(Input Inhibited): indicates the AS/400 is not accepting keyboard input.In most cases, II appears when the system is busy processing a previous request. However, input is occasionally inhibited due to an error and you need to press [Esc] to clear the error.
OVR/INS
(Overwrite/Insert): These two modes are explained below. Select the Edit Mode command of the Properties menu to change the data entry mode.INS
indicates that when you type, your characters are inserted at the current cursor position without replacing any existing characters that follow. Any subsequent characters in the fields move over as you type.OVR
indicates that when you type, your characters overwrite any existing characters.HFLU4S2
(Device Name): This indicator is the device name of the Display session on the host.Changing the Display Control Properties
The ActiveX Display Properties dialog box allows you to change the font size and how the Display session accepts characters you type.
To change your Display session's properties, follow these steps:
Saving your ActiveX Display Settings
When you make changes to the ActiveX Display control, you need to save them to a configuration file. By default, any changes you make to the ActiveX Display control properties will be saved to the configuration file listed in the Language tab when the Auto Save option is enabled in the Connection tab. When the Auto Save option is not enabled, all changes will be automatically saved to the default configuration file which is hfdsp.cfg.
If you want to save any changes to the configuration file listed in the Language tab, and the Auto Save option is not enabled in the Connection tab, right-click in the ActiveX Display control and select Session | Configuration | Save.
If you want to save any changes to a different configuration file, right-click in the ActiveX Display control and select Session | Configuration | Save As. In the Save Properties to File dialog box, choose the configuration file, and then click the Save button.
Modifying your General Properties
To have a macro starting automatically after signing on, select one from the list in the Start up Macro panel. To remove a previously selected macro, just select the "None" item from the list.
Modifying your Connection Properties
If you do not check this checkbox, your modifications will be saved to the default ActiveX Display configuration file (hfdsp.cfg).
Checking this box will have no impact on the Persistent connection and vice versa.
Modifying your Appearance Properties
When you select Use Server Colors and/or Use Server Font Size checkboxes, the ActiveX Display ignores any changes you made to the session color and/or font size and uses the server defaults.
If you do not select this checkbox, the font size does not change as you change the window size. You can resize the font manually using the Increase Font Size and Decrease Font Size
buttons.
Select the Show Ruler Lines check box to enable the display of ruler lines on the screen
Select the Show System Request menu to display the system request menu
screen when hitting the system request key combination. If this option in
unchecked, the display will show a line just above the status line where the
user can enter the system request option without displaying the menu.
Modifying your Data Processing Properties
You should always leave this checkbox selected. It is used primarily for testing purposes to determine when an error occurs during data transmission.
Switch between modes during a session by pressing the [Insert] key. This checkbox defines the default mode.
Note:
You have to hold down the Shift key when pasting text into the ActiveX Display control for this option to take effect.For example, if you copy three cells in a row of a spreadsheet and paste them into the ActiveX Display control, each tab space separating the cells will be converted into the number of blank spaces specified in this option.
When you copy text from the ActiveX Display control and paste it into a spreadsheet, blank spaces between the copied text will be converted into a tab space based on the value specified in this option.
Note:
You need to hold down the Shift key when copying text from the ActiveX Display control for this option to take effect.For example, if you set the number of blank spaces to four (4), any four spaces between the text that you copy from the ActiveX Display control will be converted into one tab space in a spreadsheet; therefore, text separated by four (4) spaces will go into separate cells in the spreadsheet. Every four blank (4) spaces will be the equivalent of a tab space; therefore, eight (8) blank spaces will be converted into two (2) tab spaces and so on.
Modifying Your Language Properties
Modifying Your Application Properties
Note:
The parameters entered in the Data Source panel must be meaningful to the application to which these parameters are passed when it launches. The parameters entered in the Data Source panel must be meaningful to the application to which these parameters are passed when it launches.Select Title from the drop-down list and enter values in the Row and Column fields that correspond to the position of the title of your host screen.
Enter a value in the Length (Opt) field. (If you leave this field at zero, then all of the data in the corresponding host field will be validated). Suppose you enter 3 in the Length (Opt) field and you have selected Title from the drop-down list. The first three characters of the host screen title will be compared against the first three characters of the name in the Screen Title box.
Note:
If you enter the value of 0 into the Row, Column, and Length(Opt) fields, the Screen Title will not be compared and validated when you launch your application even when the wrong host screen is active.Type the name of the host screen that will be active (when the application is launched) in the Screen Title box. The name that you enter in this box will be validated when you launch your program. In other words, the Screen Title will be compared with the name and position (based on the Row and Column parameters) of the host screen title. If no screen title is defined, no host screen validation is performed.
Note:
If the Row and Column co-ordinates are wrong and/or the Screen Title doesn't match that of the host screen, an "Invalid Co-ordinates: Title" error message or an "Invalid Co-ordinates:Field x" error message will appear (x refers to the number of a particular field, one through five).Select a Field from the drop-down list and fill in the same parameters as you did for the Title option. There are five Field parameters.
Note:
Be careful when you change the Share Memory: Name and Share Memory: Size. Each time they are changed, a new Share Memory object with the new size is created. If prior to changing these settings, the application has already been launched (and the process is still alive), the application won't be able to access the new Share Memory object. Also, the current instance of an ActiveX Display session won' t be able to relaunch the application. Close the application before making changes to the Share Memory settings. Remember: each instance of the ActiveX control must have the same Share Memory: Name and Share Memory: Size for the same application. Be careful when you change the Share Memory: Name and Share Memory: Size. Each time they are changed, a new Share Memory object with the new size is created. If prior to changing these settings, the application has already been launched (and the process is still alive), the application won't be able to access the new Share Memory object. Also, the current instance of an ActiveX Display session won' t be able to relaunch the application. Close the application before making changes to the Share Memory settings. Remember: each instance of the ActiveX control must have the same Share Memory: Name and Share Memory: Size for the same application.Note:
Several instances of the ActiveX Display control can launch the same application. However, only one instance of the ActiveX Display control can write to the shared memory buffer at a time. The other instances of the ActiveX Display control have to wait until the application reads the memory buffer data before they can to write to the shared memory buffer. Several instances of the ActiveX Display control can launch the same application. However, only one instance of the ActiveX Display control can write to the shared memory buffer at a time. The other instances of the ActiveX Display control have to wait until the application reads the memory buffer data before they can to write to the shared memory buffer.
Modifying your Display Color Properties
Select an element from your system from the System Color drop-down list and apply its color to your host element. For example, if you used a light gray for your Application Workspace, apply the same color to the current selection in the Property Name drop-down list.
Note: If you select User Server Colors from the Appearance tab, the system erases any changes you make in this tab and uses the server default colors.
Modifying your Display Font Properties
Strikeout: applies a bar across the characters: Strikeout text
Underline:
applies a bar under the characters: Underlined textThe ActiveX Display control provides a GUI Transform feature that allows you to change the flat appearance of the traditional green screen to a GUI interface when you select this mode.
Viewing your Keyboard Commands
Unless your keyboard is clearly marked, it's sometimes difficult to remember where all the 5250 commands and special keys are located. And with the Keyboard Editor, the traditional location of some of these commands and keys no longer apply.
Fortunately, the ActiveX control toolbar has the Keyboard Mapping dialog box. This dialog box allows you to see to which keys the 5250 keyboard functions and special keys are currently mapped.
To view your keyboard mapping of the 5250 functions, follow these steps:
Note:
You cannot change the keyboard mapping from this dialog box. If you want to change the keyboard mapping, use the Keyboard Editor.
The ActiveX display ActiveX control provides support for macros enabling users to record repetitive actions to replay them in one simple click.
The HostFront macros support advanced functionality made available by enabling the users to write and edit macros manually and using methods available in the ActiveX display control as well as standard VBScripts. The HostFront macros are editable in the standard NotePad available with any Windows OS.
For a list of supported commands from the Display ActiveX control, please refer to HostFront Specific Macro Commands.
For a list of the supported VBScripts, you can refer to any standard language reference.
To record a macro, click on the record button in the toolbar ().
You will be prompted to enter a name and a description for the macro.
Note that macro names must start with a letter.
All macros files will be saved in one folder under the Documents and Setting/User/Application Data/Farabi Technology. Farabi macro files have a .VBS extension and each file will have one macro. The path and the file name will be displayed after you click the OK button for confirmation.
Once you enter a name and click OK, you can start recording your actions. The macro recorder records only keyboard strokes and not mouse clicks or toolbar button clicks. It will however record the Connect/Disconnect and Sign on actions done using the toolbar buttons. While recording, the following floating toolbar will be displayed:
The three buttons are: Stop, Pause and Insert.
The Stop buttons stops the recorder and saves the file. This should be used to finish recording.
The Pause button stops the recording temporarily and then resumes it when clicked again. This button works in conjunction with the Insert button also.
The Insert button is used to insert special advanced macro commands into the macro script. To use the Insert button, you should first Pause the macro then click on the Insert button. When you that, you get the following dialog box:
Using this dialog box, you can insert one of four commands into the macro scripts while recording it. These commands are: (for more details on the commands see the HostFront Specific Macro Commands section)
WaitforText
WaitforCursor
SetCursorPos
MsgBox (this is a VBScript command)
After you you configure the commands you want, click OK and then click the Pause button again and resume recording the macro.
To manage your macros, click on the
button on the toolbar to open the Macros Management dialog box.
Run: Use this button to run the selected macro.
Edit: Use this button to edit the selected macro in NotePad. Changes to macros take effect immediately after saving the macro file provided that you do not change the macro name (the Sub name) inside the macro (this requires closing the browser and restarting the display session anew).
Delete: Use this button to delete the selected macro(s). This will delete the macro files.
Add to menu: Use this button to add the selected
macro(s) to the quick access menu on the toolbar accessible through the
button on the toolbar.
Remove from menu: Use this button to remove the selected macro(s) from the quick access menu if they are already added there.
Secondary macro folder: Using this folder you can get access to macros saved in any folder on your local machine or in a shared folder on the network. By default, this field is empty. You can select the folder you want by clicking the Browse button and selecting the folder you want. Macros from this folder will be marked with the (R) extension to their names (for Remote) to differentiate them from macros saved on the default local folder which will be marked with a (L) extension (for Local). All local and remote macros will be displayed in one list for easier access by the users.
You can replay a macro in one of two ways:
Using the Macro Management dialog box by clicking on the
button and then selecting the required macro and clicking Run.
Using the quick access menu accessible through the
toolbar
and then selecting the required macro. You need first to add the macro to
the quick access menu from the Macros Management dialog box.
Note that you should always start replaying the macro from exactly the same cursor position where you initially recorded it. Failing to do so will result in errors and might cause erroneous data entry. The macro does not verify its starting point by default unless you manually add some verification logic.
Macros are saved under the following folder: C:\Documents and Settings\user\Application Data\Farabi Technology, and they have a .HFM extension.
You can have only one macro per file. The macro name can differ from the filename.
You cannot use the Connect command within a macro if you are using a persistent connection mode. You can use it with non-persistent connections.
HostFront Specific Macro Commands
Below is a list of all the HostFront 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.
The Connect() method connects a user to a host session through HostFront Server.
Function Prototype
BOOL Connect(BSTR sUserName, BSTR sPassword)
This method attempts to allocate a new host session under the HostFront account defined by the given privileges.
Example
HFDISPLAY.Connect "GUEST", ""
In this example, the Connect() method attempts to allocate a new host session to the "Guest" account.
Note: Use this command only if you are authenticated to HostFront server using HostFront authentication. If you are using the other authentication methods (Windows domain, RSA), do not use it.
The Disconnect() method closes the current host session.
Function Prototype
BOOL Disconnect()
The Disconnect() method disconnects the session from the host before the script ends. You connect sessions using the Connect() method. This method returns one of the following:
Example
HFDISPLAY.PushKey [PF3]
HFDISPLAY.Disconnect
In this example, the macro disconnects the active session after exiting (usually by PF3) the application.
This method returns the build number of the ActiveX control or the HostFront server depending on the parameter passed: a 0 returns the ActiveX control build number, a 1 return the HostFront server build number.
Function Prototype
STR GetBuildNoHF(boolean bServer)
Example
Version = HFDISPLAY.GetBuildNoHF(1)
Returns 20031003 for example
The GetCursorColumnPos() method returns the column on which the cursor is currently positioned on the host screen.
Function Prototype
int GetCursorColumnPos();
Example
nCol = HFDISPLAY.GetCursorColumnPos();
The GetCursorRowPos() method returns the row on which the cursor is currently positioned on the host screen.
Function Prototype
int GetCursorRowPos();
Example
nRow = HFDISPLAY.GetCursorRowPos();
The GetField() method returns the data in the given field location on the host screen.
Function Prototype
BSTR GetField(int nRow, int nCol1, [int nCol2])
This method returns a string of the characters located at the field specified by nRow and nCol1 position. The information returns as a 32-bit character pointer (BSTR).
Example
SystName = HFDISPLAY.GetField(2, 70,-1)
In this example, the GetField() method returns the field starting at row 2 and column 70 till the end of the filed and stores it in the SystName variable.
UserName = HFDISPLAY.GetField(6, 20, 26)
In this example, the GetField() method returns the string at row 6 between columns 20 and 26 and stores it in the UserName variable.
The GetFieldLength() method returns the maximum length (in characters) of the field at given location on the current host screen.
Function Prototype
int GetFieldLength(int nRow, int nCol);
Example
nMaxLen = HFDISPLAY.GetFieldLength(2, 70);
This method returns the screen height of the current screen.
Function Prototype
short GetHostScreenHeight()
Example
ScreenWidth = HFDISPLAY.GetHostScreenHeight()
This method returns the screen width of the current screen.
Function Prototype
short GetHostScreenWidth()
Example
ScreenWidth = HFDISPLAY.GetHostScreenWidth() ()
The GetRowData() method returns the data from an entire row on the host screen.
Function Prototype
BSTR GetRowData(int nRow)
This method returns the information from a row identified by nRow. The information is returned as a 32-bit character pointer (BSTR).
Example
Row1 = HFDISPLAY.GetRowData(1)
In this example, the GetRowData() method returns all the characters on row 1 and stores them in the Row1 variable.
The GetServerInfo() method is used to retrieve active/configured session information from the server.
Function Prototype
long GetServerInfo (int nInfoType)
Example
nRet = HFDISPLAY.GetServerInfo (0)
nInfoType Returned Value
0 Server load as a percentage ( is calculated by multiplying the number of current sessions by 100 and dividing the product by the maximum number of concurrent sessions)
1 User load as a percentage ( is calculated by multiplying the number of users connected by 100 and dividing the product by the total number of users defined)
2 Maximum number of concurrent sessions
3 Number of sessions currently used
4 Total number of users defined in the server profile
5 Number of users currently connected
This method returns the text displayed in the status bar of the active screen.
Function Prototype
BSTR GetStatusLine()
Example
StausLineText = HFDISPLAY.GetStatusLine()
This method returns the user name used to sign on to HostFront server. The method returns the last user name used as stored in the profile file even if you are not currently signed on to the HostFront server.
Function Prototype
STR GetUserName();
Example
UserName = HFDISPLAY.GetUserName()
This method returns the password used to sign on to HostFront server. If you are not currently signed on to the HostFront server, the method returns an empty string.
Function Prototype
STR GetUserPassword();
Example
UserName = HFDISPLAY.GetUserPassword ()
This method returns the version number of the ActiveX control or the HostFront server.
Function Prototype
short GetVersionHF(boolean bServer)
If the parameter passed is a 0, the method returns the ActiveX control version number and if it was a 1, it returns the HostFront server version number.
Example
Version = HFDISPLAY.GetVersionHF(0)
Returns 695 for example (for a 6.9.5 release of the ActiveX Display control)
The IsAlphaField() method checks if the field at given location on the current host screen is accepting only letters and some separator characters.
Function Prototype
BOOL IsAlphaField(int nRow, int nCol);
Example
bRtn = HFDISPLAY.IsAlphaField(6, 53);
The IsConnected() method checks if the session is currently connected to a the host.
Function Prototype
BOOL IsConnected()
Example
if HFDISPLAY.isconnected()= FALSE then HFDISPLAY.Connect "Guest", "farabi"
The IsEditableField() method checks if the field at given location on the current host screen is editable or not.
Function Prototype
BOOL IsEditableField(int nRow, int nCol);
Example
bRtn = HFDISPLAY.IsEditableField(6, 53);
The IsKbdLocked() method checks to see if the keyboard is locked (input inhibited). The host will lock the keyboard when it is processing data or when there is an error such as when numeric data is entered into a text-only field.
Function Prototype
BOOL IsKbdLocked()
This method returns one of the following:
Example
bRtn = HFDISPLAY.IsKbdLocked()
The IsNonDisplayField() method checks if the field at given location on the current host screen is protected (i.e. used to input a host password).
Function Prototype
BOOL IsNonDisplayField(int nRow, int nCol);
Example
bRtn = HFDISPLAY.IsNonDisplayField(7, 53);
The IsNumericField() method checks if the field at given location on the current host screen is a numeric field. Data in a numeric fields can include digits and some separator characters such as /,+,- and space. For details on valid data on numeric fields please check the appropriate IBM documentation.
Function Prototype
BOOL IsNumericField(int nRow, int nCol);
Example
bRtn = HFDISPLAY.IsNumericField(6, 53);
The IsReverseField() method reverses the background and foreground colors of a host screen field. For example, if the background is white and the foreground is black, then the background becomes black and the foreground becomes white.
Function Prototype
BOOL IsReverseField (int nRow, int nCol) ;
Example
bRtn = HFDISPLAY.IsReverseField (7, 53);
The PrintDisplayScreen() method performs a print screen function to the specified printer. It is equivalent to the Print Screen button on the toolbar. It has two parameters, one to define whether or not to print the header and footer information, and the second to define the target printer.
Function Prototype
BOOL PrintDisplayScreen (int HeaderFooter, Str PrinterPath) ;
Parameters
HeaderFooter: |
0 : Print the header and footer 1 : Do not print the header and footer |
PrinterPath: |
The string defining the printer path. It must be enclosed between double quotes. If left empty (""), the printing will be directed to the default printer. |
Example
HFDISPLAY.PrintDisplayScreen 0, "\\printer\HP6"
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:
The available keys are listed below (for both 5250 and 3270 together):
Attention |
Field_Base |
Page_Down |
PF19 |
Auto_Reverse |
Field_Exit |
Page_Up |
PF20 |
Backspace |
Field_Mark |
PF1 |
PF21 |
BackTab |
Field_Minus |
PF2 |
PF22 |
Base |
Field_Plus |
PF3 |
PF23 |
Calc_Rev_Mode |
FieldX |
PF4 |
PF24 |
Clear |
Help |
PF5 |
|
Cursor_Down |
Hex_Mode |
PF6 |
Reload |
Cursor_Left |
Home |
PF7 |
Reset |
Cursor_Right |
Insert |
PF8 |
Reverse_Push |
Cursor_Selection |
Latin |
PF9 |
Screen_Direction |
Cursor_Up |
LightPen_Selection |
PF10 |
System_Request |
Delete_Char |
NewLine |
PF11 |
Tab |
Double_Left |
NumPad_Comma |
PF12 |
Test_Request |
Double_Right |
NumPad_Dot |
PF13 |
Toggle_RDE_RTE |
Dup |
NumPad_Slash |
PF14 |
|
End |
NumPad_Star |
PF15 |
|
Enter |
PA1 |
PF16 |
|
Erase_EOF |
PA2 |
PF17 |
|
Erase_Input |
PA3 |
PF18 |
|
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.
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:
Attention |
Field_Base |
Page_Down |
PF19 |
Auto_Reverse |
Field_Exit |
Page_Up |
PF20 |
Backspace |
Field_Mark |
PF1 |
PF21 |
BackTab |
Field_Minus |
PF2 |
PF22 |
Base |
Field_Plus |
PF3 |
PF23 |
Calc_Rev_Mode |
FieldX |
PF4 |
PF24 |
Clear |
Help |
PF5 |
|
Cursor_Down |
Hex_Mode |
PF6 |
Reload |
Cursor_Left |
Home |
PF7 |
Reset |
Cursor_Right |
Insert |
PF8 |
Reverse_Push |
Cursor_Selection |
Latin |
PF9 |
Screen_Direction |
Cursor_Up |
LightPen_Selection |
PF10 |
System_Request |
Delete_Char |
NewLine |
PF11 |
Tab |
Double_Left |
NumPad_Comma |
PF12 |
Test_Request |
Double_Right |
NumPad_Dot |
PF13 |
Toggle_RDE_RTE |
Dup |
NumPad_Slash |
PF14 |
|
End |
NumPad_Star |
PF15 |
|
Enter |
PA1 |
PF16 |
|
Erase_EOF |
PA2 |
PF17 |
|
Erase_Input |
PA3 |
PF18 |
|
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>”
The PutField() method fills fields with data on the host screen.
Function Prototype
BOOL PutField(int nRow, int nCol1, VARIANT vtData)
This method places a constant, or the value of the variable, in the field starting at the specified row and column. This method returns one of the following:
When using PutField() methods on a host screen, the PushKey(ENTER) method validates your entries and moves on to the next screen.
You can use (-1) for the row and column to have the data entered at the current field.
Example
HFDISPLAY.PutField 6, 53,“UserName”
HFDISPLAY.PutField 7, 53, “Password”
HFDISPLAY.PushKey [ENTER]
In this example, the PutField() method enters the values UserName and Password in the user name and password fields of a host sign on screen.
Using the -1 parameter, the example becomes as shown below. This however assumes the cursor is currently at the correct field location where the username should be entered and the password field is the next one (after one Tab move).
HFDISPLAY.PutField -1, -1, “UserName”
HFDISPLAY.PushKey [TAB]
HFDISPLAY.PutField -1,-1, “Password”
HFDISPLAY.PushKey [ENTER]
The SetCursorPos() method places the cursor on the host screen at a specified position.
Function Prototype
BOOL SetCursorPos(int nRow, int nCol)
This method places the cursor at the specific row and column. In some host applications, you may need to position the cursor at a specific location on the host screen before issuing a PushKey() method. This method returns one of the following:
Example
HFDISPLAY.SetCursorPos 20 , 7
HFDISPLAY.PushKey [PF3]
In this example, the cursor is placed at row position 20 and column 7 before the [PF3] key is sent to the host application.
This method is used to sign on to HostFront with the given user name and password.
Function Prototype
boolean SignOn(BSTR sUserName, BSTR sUserPassword)
Example
SignonSuccessful = HFDISPLAY.SignOn(“Visitor”,”Farabi”)
Note: Use this command only if you are authenticated to HostFront server using HostFront authentication. If you are using the other authentication methods (Windows domain, RSA), do not use it.
This method causes the macro to be suspended until the cursor is at a specified location on the active screen.
If you want to specify a column only use the value -1 for the row (and vice-versa).
Function Prototype
void WaitForCursor (int nRow, int nColumn) ;
Example
HFDISPLAY.WaitForCursor 4,35
This method causes the macro to be suspended until the specified text is entered at the specified location.
Value -1 can be used for both nRow and nColumn meaning that the text can be anywhere on the active screen.
Function Prototype
void WaitForText (string szText , int nRow, int nColumn)
Example
HFDISPLAY.WaitForText “Montreal”, -1,-1