Class AtmScreen3270
Provides 3270-specific screen services to AtmSession objects.
Implements
Inherited Members
Namespace: Attachmate.Verastream.HostIntegrator.EAO2V
Assembly: Attachmate.Verastream.HostIntegrator.EAO2V.dll
Syntax
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[Guid("9CA36516-81BD-4399-A07F-6CE26BED5E9E")]
public class AtmScreen3270 : IAtmScreen3270
Properties
Columns
Returns the number of columns in the screen. Read-only.
Declaration
public int Columns { get; }
Property Value
Type | Description |
---|---|
int |
See Also
CursorColumn
Returns the column of the current cursor position. A value of 1 is the left edge of the screen. Read-only.
Declaration
public int CursorColumn { get; }
Property Value
Type | Description |
---|---|
int |
See Also
CursorRow
Returns the row of the current cursor position. A value of 1 represents the top row of the screen. Read-only.
Declaration
public int CursorRow { get; }
Property Value
Type | Description |
---|---|
int |
See Also
KeyboardLocked
Returns the state of the keyboard: True if locked; False if unlocked. Read-only.
Declaration
public bool KeyboardLocked { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
Oia
Returns an OIA object. Read-only.
Declaration
public IAtmOia3270 Oia { get; }
Property Value
Type | Description |
---|---|
IAtmOia3270 |
Owner
Specifies the current session owner with respect to the host application. Read-only.
Declaration
public ATM_OIA_OWNER Owner { get; }
Property Value
Type | Description |
---|---|
ATM_OIA_OWNER |
See Also
Rows
Returns the number of rows in the Screen. Read-only.
Declaration
public int Rows { get; }
Property Value
Type | Description |
---|---|
int |
See Also
ScreenType
The Type property returns a value indicating the session type -- 3270, 5250, or VT. Read-only.
Declaration
public int ScreenType { get; }
Property Value
Type | Description |
---|---|
int |
Text
The text currently on the host screen. The string returned has a CRLF at the end of each line of the screen. Read-only.
Declaration
public string Text { get; }
Property Value
Type | Description |
---|---|
string |
See Also
Methods
FieldCount(ATM_FIELDTYPE)
Returns the count of specified fields.
Declaration
public int FieldCount(ATM_FIELDTYPE inFieldType)
Parameters
Type | Name | Description |
---|---|---|
ATM_FIELDTYPE | inFieldType | Specifies the type of fields to be counted. See the constant ATM_FIELDTYPE. |
Returns
Type | Description |
---|---|
int | The number of fields found. |
See Also
FindField(int, int, ATM_FINDFIELD, ATM_FIELDTYPE, ATM_WRAP, out int, out int, out int, out int)
If the specified field is found, returns True and the field's boundaries.
Declaration
public bool FindField(int inRow, int inCol, ATM_FINDFIELD inMode, ATM_FIELDTYPE inFieldType, ATM_WRAP inWrap, out int outRow, out int outColumn, out int outLength, out int outAttribute)
Parameters
Type | Name | Description |
---|---|---|
int | inRow | The row in which to begin searching. |
int | inCol | The column in which to begin searching. |
ATM_FINDFIELD | inMode | Specifies the field to look for: current, next, or previous. See the constant ATM_FINDFIELD. |
ATM_FIELDTYPE | inFieldType | Specifies the type of field to search for. See the constant ATM_FIELDTYPE. |
ATM_WRAP | inWrap | Specifies whether to wrap to the top of the screen after reaching the end of the screen. See the constant ATM_WRAP. |
int | outRow | The row of the found field. If the field is not found, the value is set to zero. |
int | outColumn | The field column location. If the field is not found, the property will be set to zero. |
int | outLength | The length of the found field. If the field is not found, the value is set to zero. |
int | outAttribute | A value representing the field attribute byte of the specified field. See the "Field Attributes" topic in the EAO Programmer's Guide for more details. The MDT bit is not available in the VHI connector and will always be zero. |
Returns
Type | Description |
---|---|
bool | Indicates if a field was found. |
See Also
FindString(string, int, int, out int, out int)
Searches the screen for the specified text, starting at the specified position. If found, True and the start position of the string are returned.
Declaration
public bool FindString(string inText, int inStartRow, int inStartColumn, out int outRow, out int outColumn)
Parameters
Type | Name | Description |
---|---|---|
string | inText | The text to search for. |
int | inStartRow | The row at which to begin searching. |
int | inStartColumn | The column at which to begin searching. |
int | outRow | The string location row. If the string is not found the variable will be set to zero. |
int | outColumn | The string column location. If the string is not found, the variable will be set to zero. |
Returns
Type | Description |
---|---|
bool | true if the string is found, otherwise false. |
See Also
FindStringEx(string, int, int, int, int, ATM_AREA, ATM_WRAP, int, out int, out int)
Searches the screen for the specified text, from the start position to the end position. If found, True and the start position of the string are returned.
Declaration
public bool FindStringEx(string inText, int inStartRow, int inStartColumn, int inEndRow, int inEndColumn, ATM_AREA inAreaType, ATM_WRAP inWrap, int inDirection, out int outRow, out int outColumn)
Parameters
Type | Name | Description |
---|---|---|
string | inText | The text to search for. |
int | inStartRow | The row at which to begin searching. |
int | inStartColumn | The column at which to begin searching. |
int | inEndRow | Row at which to stop searching. |
int | inEndColumn | Column at which to stop searching. |
ATM_AREA | inAreaType | Specifies the type of area to be searched. |
ATM_WRAP | inWrap | Specifies whether to wrap to the top of the screen after reaching the end of the screen. This parameter is ignored when inArea is defined as ATM_AREA_BLOCK. |
int | inDirection | Specifies the direction to search when looking for the string. When searching backwards, searching begins at the end of the selected area. |
int | outRow | The row where the string was found. If the string is not found, the variable will be set to zero. |
int | outColumn | The string column location. If the string is not found, the variable will be set to zero. |
Returns
Type | Description |
---|---|
bool | true if the string is found, otherwise false. |
See Also
GetCursor(out int, out int)
Retrieves the cursor position.
Declaration
public void GetCursor(out int outCursorRow, out int outCursorColumn)
Parameters
Type | Name | Description |
---|---|---|
int | outCursorRow | The current cursor row. |
int | outCursorColumn | The current cursor column. |
See Also
GetData(int, int, int, int, int, int, int, ref byte[], out int)
Captures data from the host screen. Similar to GetString, but also can get the attribute bytes from the screen. Returns text with attribute bytes.
Declaration
public int GetData(int inRow, int inCol, int inNumChars, int inNumPositions, int inType, int inFormat, int inCodePage, ref byte[] inoutBuf, out int outBufLength)
Parameters
Type | Name | Description |
---|---|---|
int | inRow | The first row from which to retrieve data. |
int | inCol | The first column from which to retrieve data. |
int | inNumChars | The number of characters to retrieve. |
int | inNumPositions | This parameter is ignored. |
int | inType | This parameter must be set to ATM_GETDATA_TYPE_HLLAPI. |
int | inFormat | This parameter must be set to ATM_GETDATA_FMT_TEXT. |
int | inCodePage | This parameter is ignored. |
byte[] | inoutBuf | A variable that will contain the returned data. |
int | outBufLength | The length of the output data. |
Returns
Type | Description |
---|---|
int | The result of the method call. A non-zero value indicates success. |
GetString(int, int, int)
Returns the visible text from the specified location. If the row and column are zero, the entire screen is returned.
Declaration
public string GetString(int inRow, int inColumn, int inLength)
Parameters
Type | Name | Description |
---|---|---|
int | inRow | The first row from which to retrieve data. |
int | inColumn | The first column from which to retrieve data. |
int | inLength | The number of screen positions to return. Ignored when both inStartRow and inStartColumn are zero. |
Returns
Type | Description |
---|---|
string | the visible text from the specified location. |
Remarks
Calls GetStringEx with: ATM_AREA_STREAM, ATM_WRAP_OFF, ATM_SCREENATTR_VISIBLE, inFlags=0.
See Also
GetStringEx(int, int, int, int, ATM_AREA, ATM_WRAP, int, int)
Returns text from the specified location. If inStartRow and inStartColumn are zero, the entire screen is returned. VHI limitation: this method does not return hidden (non-display) field contents.
Declaration
public string GetStringEx(int inStartRow, int inStartColumn, int inEndRow, int inEndColumn, ATM_AREA inAreaType, ATM_WRAP inWrap, int inAttr, int inFlags)
Parameters
Type | Name | Description |
---|---|---|
int | inStartRow | The first row from which to retrieve data. |
int | inStartColumn | The first column from which to retrieve data. |
int | inEndRow | The last row from which to retrieve data. Ignored when both inStartRow and inStartColumn are zero. |
int | inEndColumn | The last column from which to retrieve data. Ignored when both inStartRow and inStartColumn are zero. |
ATM_AREA | inAreaType | Specifies the type of area to return. |
ATM_WRAP | inWrap | Specifies whether to wrap to the top of the screen after reaching the end of the screen. This parameter is ignored when inArea is defined as ATM_AREA_BLOCK. |
int | inAttr | Specifies the type of fields to retrieve. These options can be OR’ed together to create various combinations. For example, ATM_SCREENATTR_UNPROTECTED | ATM_SCREENATTR_VISIBLE will return only unprotected, visible fields. VHI limitation: this method does not return hidden (non-display) field contents. |
int | inFlags | Specifies how to interpret and format the screen. Options include line termination, special character treatment, and so on. These options can be OR’ed together, but you can only specify one string terminator. If a string terminator is included as a parameter, GetStringEx will add the terminator to the end of a line of text captured from the screen. In stream mode, the end of a line is the last column of the host screen. In block mode, the end of a line is the right edge of the block. |
Returns
Type | Description |
---|---|
string | the visible text from the specified location. |
See Also
PutString(string, int, int)
Copies a string of text to the host screen. Note: PutString only copies text to the screen. To send keystrokes (such as ENTER or TAB), use SendKeys(string, int).
Declaration
public int PutString(string inText, int inStartRow, int inStartColumn)
Parameters
Type | Name | Description |
---|---|---|
string | inText | The text to copy to the host. |
int | inStartRow | The row at which to begin writing. |
int | inStartColumn | The column at which to begin writing. |
Returns
Type | Description |
---|---|
int | number of characters written. |
See Also
PutStringEx(string, int, int, int, int, ATM_AREA, ATM_WRAP, int, bool)
Writes to the specified position, returning the number of characters put. Similar to PutString, but allows additional options. Data can be copied in block or stream mode, and can be copied to multiple unprotected fields.
Declaration
public int PutStringEx(string inText, int inStartRow, int inStartColumn, int inEndRow, int inEndColumn, ATM_AREA inAreaType, ATM_WRAP inWrap, int inMode, bool inFill)
Parameters
Type | Name | Description |
---|---|---|
string | inText | The text to copy to the host. |
int | inStartRow | The row at which to begin writing. |
int | inStartColumn | The column at which to begin writing. |
int | inEndRow | The row at which to stop writing. |
int | inEndColumn | The column at which to stop writing. |
ATM_AREA | inAreaType | Specifies the type of area to copy to. |
ATM_WRAP | inWrap | Specifies whether to wrap to the top of the screen after reaching the end of the screen. This parameter is ignored when inArea is defined as ATM_AREA_BLOCK. |
int | inMode | ignored. |
bool | inFill | When True, the area specified is filled with the inText string. |
Returns
Type | Description |
---|---|
int | the number of characters written. |
See Also
SendKeys(string, int)
Used to send characters and special keys to the host session. Keys are sent to the current cursor position.
Declaration
public void SendKeys(string inText, int inType = 131072)
Parameters
Type | Name | Description |
---|---|---|
string | inText | Keys to send to the host. Can be a combination of text characters and host keystrokes. |
int | inType | The format of the host keystrokes included in the string, either HLLAPI (0x20000) format or BRACES (0x10000) format. For HLLAPI format, you can optionally OR this parameter with a different escape character. |
Remarks
Keystrokes can be specified in HLLAPI format, which has a special code for each host keystroke, such as "@E" for the host ENTER key, or braces format, where the key name is surrounded by braces, such as "{ENTER}". You can also use SendKeys to send text character strings to the host. Text will be sent to the current cursor location. For example, to send the text "logoff" followed by an ENTER key, inText would be "logoff@E". If you are sending a lot of text to the screen, it may be more efficient to use PutString instead. If an invalid key sequence is detected, no characters or keys will be sent. Security warning: do not pass unvalidated user input to this method.
See Also
SetCursor(int, int)
Sets the cursor position.
Declaration
public void SetCursor(int inCursorRow, int inCursorColumn)
Parameters
Type | Name | Description |
---|---|---|
int | inCursorRow | Specifies the row where the cursor should be placed. |
int | inCursorColumn | Specifies the column where the cursor should be placed. |
See Also
WaitForCursor(int, int, int)
Waits for the cursor to appear at the specified position. Note that passing 0 for either Row or Col in EAO does not behave as documented.
Declaration
public IAtmWait WaitForCursor(int inCursorRow, int inCursorColumn, int inWaitOption = -1)
Parameters
Type | Name | Description |
---|---|---|
int | inCursorRow | Specifies the row in which the cursor must appear to satisfy the wait. When inRow is set to zero, the wait will be satisfied when the cursor appears in the column specified regardless of which row the cursor is in. |
int | inCursorColumn | Specifies the column in which the cursor must appear to satisfy the wait. When inColumn is set to zero, the wait will be satisfied when the cursor appears in the row specified regardless of which column the cursor is in. |
int | inWaitOption | A value that can be 0 (ATM_WAIT_ASYNC) or -1 (ATM_WAIT_FOREVER) to indicate an indefinite wait, or a number that will be divided by 1000 to indicate the number of seconds to wait for WaitForString to be satisfied before timing out. |
Returns
Type | Description |
---|---|
IAtmWait | a Wait object that contains true if the string appeared, or false if the timeout expired. |
Remarks
When WaitForCursor is called with inWaitOptions set to ATM_WAIT_ASYNC or ATM_WAIT_FOREVER, the call will not return until the wait has been satisfied. If inWaitOptions is set to a numeric value, the call will not return until the wait has been satisfied or the wait times out. Note that the VHI timeout parameter does not have millisecond precision. The wait value passed to VHI is divided by 1000.
See Also
WaitForString(string, int, int, int)
Waits for the specified text to appear at the specified position. If the row and column are zero, waits for text to appear anywhere on the screen.
Declaration
public IAtmWait WaitForString(string inText, int inCursorRow, int inCursorColumn, int inWaitOption = -1)
Parameters
Type | Name | Description |
---|---|---|
string | inText | The text string to wait for. |
int | inCursorRow | Row to look for the string. If the row is set to 0, the wait will be satisfied if the string appears in the column specified, regardless of the row. |
int | inCursorColumn | Column to look for the string. If the column is set to 0, the wait will be satisfied if the string appears in the row specified, regardless of the column. |
int | inWaitOption | A value that can be 0 (ATM_WAIT_ASYNC) or -1 (ATM_WAIT_FOREVER) to indicate an indefinite wait, or a number that will be divided by 1000 to indicate the number of seconds to wait for WaitForString to be satisfied before timing out. |
Returns
Type | Description |
---|---|
IAtmWait | a Wait object that contains true if the string appeared, or false if the timeout expired. |
Remarks
When WaitForString is called with inWaitOptions set to ATM_WAIT_ASYNC or ATM_WAIT_FOREVER, the call will not return until the wait has been satisfied. If inWaitOptions is set to a numeric value, the call will not return until the wait has been satisfied or the wait times out. Note that the VHI timeout parameter does not have millisecond precision. The wait value passed to VHI is divided by 1000.
See Also
WaitHostQuiet(int, int)
Waits for the Host session to be idle for the specified number of milliseconds.
Declaration
public IAtmWait WaitHostQuiet(int inSettleTime, int inWaitOption = -1)
Parameters
Type | Name | Description |
---|---|---|
int | inSettleTime | The amount of time, in milliseconds, that the session needs to be idle before the wait condition is satisfied. |
int | inWaitOption | A value that can be 0 (ATM_WAIT_ASYNC) or -1 (ATM_WAIT_FOREVER) to indicate an indefinite wait, or a number that will be divided by 1000 to indicate the number of seconds to wait for WaitForString to be satisfied before timing out. |
Returns
Type | Description |
---|---|
IAtmWait | a Wait object that contains true. |
Remarks
When WaitForString is called with inWaitOptions set to ATM_WAIT_ASYNC or ATM_WAIT_FOREVER, the call will not return until the wait has been satisfied. If inWaitOptions is set to a numeric value, the call will not return until the wait has been satisfied or the wait times out. Note that the VHI timeout parameter does not have millisecond precision. The wait value passed to VHI is divided by 1000.