sCfg | (String) The initial configuration data for the specific printer obtained earlier by the Pm.PrinterCfg method.
If configuration data is valid, then the printer will be selected in the window and will be preset according to the data contained. This allows you to view or change the configuration data for a specific printer. Entries are in the KeyVal format. |
---|---|
onComplete | (Function) The parameter onComplete contains a function that will be called for asynchronous handover of the result. The function must be in syntax: function onComplete(ev) {};
where the parameter ev.Value contains the returned value (result) of the asynchronous calling. |
function onComplete(ev)
{
if (Pm.StringLen(ev.Value) > 0)
{
Pm.IniFileWrite("#cfg:config.ini", "Printer", "printer1", ev.Value);
}
}
var sCfg = Pm.IniFileRead("#cfg:config.ini", "Printer", "printer1", "");
Pm.PrinterCfg(sCfg, onComplete);