Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiSetCurrentTextSelectionLoc

hiSetCurrentTextSelectionLoc(
w_windowId 
x_startIndex 
x_endIndex 
)
=> t | nil

Description

Selects the range of text specified by the start and end indexes in the given text window. This is equivalent to selecting the text with the mouse.

Arguments

w_windowId

ID of the text window.

x_startIndex

The index of the first character to be selected, starting from 0.

x_endIndex

The index of the last character to be selected.

Values Returned

t

The requested range was selected.

nil

The requested range was not selected.

Examples

The hiSetCurrentTextSelectionLoc function selects the first 7 characters. The hiGetClipboard function returns the selected text, Private, which is stored in the clipboard.

win=(view "memoirs.txt")
(hiSetCurrentTextSelectionLoc win 0:6)
(hiGetClipboard)
> "Private"

Related Topics

Functions of Viewfile Window

hiGetClipboard


Return to top
 ⠀
X