WinShowMenu

From kwiki

Jump to: navigation, search
This article is written by Konrad, thus using rather nonstandard English:)

WinShowMenu (DNM Script function)

full declaration

string WinShowMenu (array_var commands)

return value

string

description

Shows a menu (context menu) based on given array of commands.

Returns chosen string or "" if user cancelled.

Examples:

//let's show three menu commands (with a separator - the third array element)
var $ar=Array("some command 1","some command 2","","some command 3");
var $sChosen=WinShowMenu($ar);
MessageBox($sChosen);
//another example, using flags like :checked: or :grayed:
var $ar2=Array(":checked:some command 1",":grayed:some command 2","","some command 3");
var $sChosen=WinShowMenu($ar2);
MessageBox($sChosen);
Personal tools
konradp.com