attach_imageview


The attach_imageview function is a non-class function that 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 class method CImageView:Attach.

The related attachlist_imageview function attaches the image window selected from a list of all open image windows.

Syntax

CImageView_obj = attach_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.

Example

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:

V = attach_imageview()

-- attach the top-most image window

if V == nil then Exit() end

-- if not successful, exit the script

Printf("Attached imageview %s\n")

-- print the title of the attached window

Related Topics

CImageView class

new

Attach

attachlist_imageview


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