CTextView:Attach
The Attach method creates a new CTextView object attached to an text window displayed on the Mira desktop. The script can then collect text from the window and modify the window contents. This method selects the top-most text window among all windows on the desktop. This function does not use an existing CTextView object. Also see the equivalent non-class function attach_textview.
The related AttachFromList method attaches the image window selected from a list of all open image windows.
CTextView_obj = CImage:Attach() |
On success, a new CTextView class object is returned.
On failure, nil is returned. This usually means no text window is shown on the Mira desktop.
Assume that several text windows are displayed on the Mira desktop, and the window of interest is top-most of all text windows. The following script attaches that window to the script:
|
-- attach the top-most text window |
|
-- if not successful, exit the script |
|
-- print the title of the attached window |
CTextView class, new, AttachFromList, attach_textview, attachlist_textview
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.