MyChat Scripts: function mPersonalContactsIsGroupExists, check if a group exists in a user's personal contact list
Check if a group with a specified name is in a user's personal contact list. The letter case and spaces in the end and at the beginning does matter.
Syntax
mPersonalContactsIsGroupExists(iUINOwner: integer; sGroupName: string): boolean;
Parameters and return values
Parameter |
Type |
Value |
iUINOwner |
integer |
user unique ID; an owner of a personal contact list, >0; |
sGroupName |
string |
name of the contact group. |
Function result
"True" if a group with a specified name is in a user's personal contact list. "False" if not or you specify nonexistent UIN or UIN = 0.
Example
const
UIN_OWNER = 6;
GROUP_NAME = 'MyChat Developers';
begin
if mPersonalContactsIsGroupExists(UIN_OWNER, GROUP_NAME) then mLogScript('Ok!', '')
else mLogScript('Group does not exist or unregistered UIN', '');
end.
Script work result
[16:24:42] (Log "mPersonalContactsIsGroupExists"): Ok!
[16:24:42] (Run "mPersonalContactsIsGroupExists"): Script operation time: 7 ms
[16:24:42] (Run "mPersonalContactsIsGroupExists"): Script done successfully.