while not bError and not bFound and (i<lvHotkeys.Items.Count) do
if lvHotkeys.Items[i].SubItems[ITEM_ID]=sItemID then
begin
if cboActions.Items.IndexOf(lvHotkeys.Items[i].SubItems[ITEM_ACTION])=2 then
bError := True
else
bFound := True;
end
else
inc(i);
if bFound then
begin
GetDelay(sCommand);
sItemID := NextItem(sCommand);
end
else
bError := True
end;
if bError then
begin
Application.MessageBox('This entry contains one or more invalid IDs (ID does not exist or ID belongs to Multiple Action command).', 'Invalid IDs found', MB_ICONEXCLAMATION or MB_OK);