MyChat Scripts: mPersonalContactsIsEmpty, check if a personal contact list is empty
Check if a user has at least one entry in his personal contact list.
Syntax
function mPersonalContactsIsEmpty(iUINOwner: integer): boolean;
Parameter |
Type |
Value |
iUINOwner |
integer |
user unique ID, >0; |
Function result
"True" if the contact list is empty or nonexistent user is specified (or UIN = 0). "False" if a user's personal contact list has at least one entry (a group or users).
Example
const
UIN_OWNER = 6;
begin
if mPersonalContactsIsEmpty(UIN_OWNER) then mLogScript('Contact list is empty or user does not exist', '')
else mLogScript('User''s contact list is not empty', '');
end.
Script work result
[19:08:22] (Log "mPersonalContactsIsEmpty"): User's contact list is not empty
[19:08:22] (Run "mPersonalContactsIsEmpty"): Script operation time: 7 ms
[19:08:22] (Run "mPersonalContactsIsEmpty"): Script done successfully.