Something
public text v1 · immutable i:=1;
Comport1.Open;
while i < StringGrid1.RowCount do
begin
sorszam:=StrToInt(StringGrid1.Cells[0,i]);
kartyaszam:=StrToInt(StringGrid1.Cells[1,i]);
csoport:=StrToInt(StringGrid1.Cells[2,i]);
if irhatok = true then
begin
Comport1.WriteStr(char(hi(sorszam)) + char(lo(sorszam)));
sleep(10);
Comport1.WriteStr(char(hi(kartyaszam)) + char(lo(kartyaszam)));
sleep(10);
Comport1.WriteStr(char(csoport));
irhatok:=false;
i:=i+1;
end;
end;