MyChat Scripts Engine: mGetConfUIDByName
Function to obtain numeric identifier (UID) of multi-user text conference by its name.
Syntax
function mGetConfUIDByName(sConfName: string): integer;
Parameters and return values
Parameter |
Type |
Value |
sConfName |
string |
conference name. |
Function result
Conference numeric identifier, If there is no such conference, the function returns "-1".
Example
const
CONFNAME = 'main';
var
iUID: integer;
s: string;
begin
iUID := mGetConfUIDByName(CONFNAME);
if iUID = -1 then mLogScript('Conference "' + CONFNAME +'" does not exist', '')
else mLogScript('Conference "' + CONFNAME +'" has UID ' + IntToStr(iUID), '');
end.
Script work result
[19:43:20] (Log "mGetConfUIDByName"): Conference "main" has UID 1
[19:43:20] (Run "mGetConfUIDByName"): Script operation time: 3 ms
[19:43:20] (Run "mGetConfUIDByName"): Script done successfully.