xsh.Screen

xsh.Screen

The following functions and variables can be used when handling the Xshell terminal screen. To use these functions and variables, execute them together with the xsh.Screen function. For example, to use the 'Clear()' function, use 'xsh.Session.Clear()'.

Functions

 

 

 

Return Value

Function

Parameter

Description

void

Clear()

 

Clear terminal screen.

Void

ClearBuffer()

 

Clear the invisible area(the Scroll back buffer) of ​​the terminal

Void

ClearScreen()

 

Clear the currently visible area of ​​the terminal

BSTR

Decrypt(LPCTSTR lpszString)

lpszString
Encrypted string

Decrypt a string encrypted with Encrypt().

BSTR

Encrypt(LPCTSTR lpszString)

lpszString
String to be encrypted

Encrypt a string. If a Master Password is set, the Master Password is used for encryption.

BSTR

Get(long nBegRow, long nBegCol, long nEndRow, long nEndCol)

nBegRow
Terminal row starting position
nBegCol
Terminal column starting position
nEndRow
Terminal row ending position
nEndCol
Terminal column ending position

Read the character string in the specified terminal section and return the value.

BSTR

GetClipboardText()

 

Retrieve the string stored in the clipboard.

BOOL

IsAltScreen()

 

Check if a program, for example vim, is running in the current terminal.

void

Send(LPCTSTR lpszStrToSend)

lpszStrToSend
Character string to send

Send message to terminal.

Void

SetClipboardText(LPCTSTR lpszString)

lpszString
String to put in clipboard

Save a string to the clipboard.

void

WaitForString(LPCTSTR lpszString)

lpszString
Character string to be displayed on the terminal.

Wait for message.

Long

WaitForStrings(VARIANT FAR* strArray, long nTimeout)

strArray
Character string to be displayed on the terminal
nTimeout
Wait time millisecond value
Return Value
The number of found strings.

Wait for message until timeout.

 

Variable

 

 

Name

Type

Description

CurrentColumn

long

Return the current column.

CurrentRow

long

Return the current row.

Columns

long

Retrieve the total columns same as terminal width.

Rows

long

Retrieves the total row same as terminal lines

Synchronous

BOOL

Set screen synchronization (True means synchronize and false means do not ​ ​synchronize)​

What does xsh.Screen.Synchronous do?

CurrentRowInScreen

long

Return the current row based on the visible area of the terminal