CImageView:Attach CImageView:Close

CImageView:AttachFromList


The AttachFromList method creates a new CImageView object attached to an image window on the Mira desktop. The script can then collect data from the image and change its contents. This function requires the user to select the target window from a list of all image windows on the desktop. This function does not use an existing CImageView object. Also see the equivalent non-class function attachlist_imageview.

The related Attach method attaches the top-most image window.

Syntax

CImageView_obj = attachlist_imageview()

bullet.gif    On success, a new CImageView class object is returned.

bullet.gif    On failure, nil is returned. This usually means no image window is shown on the Mira desktop.

Remarks

This function collects all image windows on the Mira desktop into a list, then displays them in a window where the target image window is selected. The selected image window is returned as a new CImageView object. Note that the list includes the number of images in the image set owned by the window.

Example

Assume that several image windows are displayed on the Mira desktop along with other windows. The following script attaches one of the image windows to the script:

V = attachlist_imageview

-- select the target image window

if V == nil then Exit() end

-- if not successful, exit the script

Printf("Attached image view %s\n")

-- print the title of the attached window

Related Topics

CImageView class, new, attachlist_imageview


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.