world.WindowWrite

MUSHclient script function (Method) — introduced in version 4.36

Writes the contents of a miniwindow to disk as a graphics file

Prototype

long WindowWrite(BSTR WindowName, BSTR FileName);

Data type meanings

Description

The entire contents of the named miniwindow are written to disk as file name FileName. The file name must end in .PNG or .BMP. Based on the file name, either a BMP or PNG file is written.

The file name is not case-sensitive.

Lua example

WindowWrite (win, "window_saved.png");

Return value

eNoSuchWindow - no such miniwindow

eNoNameSpecified - no file name specified

eBadParameter - file name too short or does not end in .BMP or .PNG

eCouldNotOpenFile - cannot open file (eg. pathname does not exist, no write permissions)

eLogFileBadWrite - problem writing (eg. disk full)

eOK - success

Return code meanings

Related topic

MiniWindows

See also

FunctionDescription
WindowLoadImageLoads an image into a miniwindow from a disk file