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