function RollStr(str: string; count: Integer = 1): string; var i, k, len: Integer; begin len := length(str); for k := 0 to Count - 1 do begin if ord(str[1]) > 127 then str := copy(str, 3, MAXINT) + copy(str, 1, 2) else str := copy(str, 2, MAXINT) + copy(str, 1, 1); end; Result := str; end;
procedure TForm1.Timer1Timer(Sender: TObject); begin caption := RollStr(caption); end;