nMode | (Long) Finding the open window: 0 - The value of the sWnd parameter corresponds to the frame identifier blankid (see _blank:blankid) of this application. 1 - The value of the sWnd parameter corresponds to the whole text in the header of the window of another application. 2 - The value of the sWnd parameter corresponds to the beginning of the text in the header of the window of another application. 3 - The value of the sWnd parameter is included inside the text in the header of the window of another application. |
---|---|
sWnd | (String) Text that describes open the window of this or another application. |
nOper | (Long) Required operation over the open window: 0 - Test whether the window is opened. Don't set the parameters vPar0, vPar1 and vPar2. 1 - Sending the Windows message to the window (see the documentation Win32 API in OS Windows) vPar0 (Long) - the code of the Windows message vPar1 (Long) - the first parameter WPARAM of the Windows message vPar2 (Long) - the second parameter LPARAM of the Windows message 10 - Closing the open window (if it is a main window then closing the whole application). Don't set the parameters vPar0, vPar1 and vPar2. 11 - Moving the opened window on top. Don't set the parameters vPar0, vPar1 and vPar2. 12 - Minimization of the opened window. Don't set the parameters vPar0, vPar1 and vPar2. 13 - Maximization of the opened window. Don't set the parameters vPar0, vPar1 and vPar2. 14 - Restore Down of the open window. Don't set the parameters vPar0, vPar1 and vPar2. |
vPar0 | [optional] (Variant) The meaning depends on the operation (on the nOper parameter). |
vPar1 | [optional] (Variant) The meaning depends on the operation (on the nOper parameter). |
vPar2 | [optional] (Variant) The meaning depends on the operation (on the nOper parameter). |
If it is the window of this application then it is identified by frame identifier blankid (see _blank:blankid).
If it is the window of another application then it is identified by the text in window header.
if (Pm.WndOper(1, "Calculator", 0))
//...
if (Pm.WndOper(3, "alculato", 0))
//...
Pm.WndOper(0, "_blank.alarms", 10);
var oRect = Pm.CreatePmMap();
oRect.x = 1920;
oRect.y = 0;
oRect.dx = 1000;
oRect.dy = 800;
Pm.WndOper(0, "_blank.alarms", 21, oRect);
Pm.WndOper(0, "_blank.alarms", 13);
var oRect = Pm.WndOper(0, "_blank.alarms", 20);
var bWrite = Pm.IniFileWrite("#cfg:Config.ini", "Position", "alarms", Pm.JsonStringify(oRect));
var sRect = Pm.IniFileRead("#cfg:Config.ini", "Position", "alarms", '{"x":0;"y":0;"dx":900;"dy":500;}');
Pm.WndOper(0, "_blank.alarms", 21, Pm.JsonParse(sRect).Value);