world.WindowImageFromWindow

MUSHclient script function (Method) — introduced in version 4.35

Creates an image from another miniwindow

Prototype

long WindowImageFromWindow(BSTR WindowName, BSTR ImageId, BSTR SourceWindow);

Data type meanings

Description

This uses an existing miniwindow's offscreen bitmap, to make an image that can be loaded into another miniwindow. This lets you set up offscreen windows (that you may never plan to actually show with WindowShow) as "work areas" for creating text or images, that can be loaded or blended into other windows.

WindowName - the name of an existing miniwindow.

ImageId - the image id to store its image under.

SourceWindow - the miniwindow name that is the source of the image.

For more information, see:

http://www.gammon.com.au/mushclient/mw_images.htm

Lua example

-- create another window
WindowCreate ("map2window", 0, 0, 150, 150, 4, 0, 0x000000) ) -- top left corner

-- pull in map window as "map" from mapping plugin 
WindowImageFromWindow("map2window", "map", "86810b755a33169f0f1d9585")

-- draw our small map into "map2" window
WindowDrawImage ("map2window", "map", 0, 0, 0, 0, 2);

-- show smaller map
WindowShow ("map2window", true)

Return value

eNoSuchWindow - no such miniwindow (either source or destination)

eOK - completed OK

Return code meanings

Related topic

MiniWindows

See also

FunctionDescription
WindowCreateCreates a miniwindow
WindowCreateImageCreates an image in a miniwindow
WindowDrawImageDraws an image into a miniwindow
WindowImageInfoReturns information about an image
WindowImageListLists all images installed into a miniwindow
WindowImageOpDraws an ellipse, rectangle or round rectangle, filled with an image
WindowLoadImageLoads an image into a miniwindow from a disk file