I wonder if this script is how to generate the sid User
--
--
could someone help me?Quote:
var
s, pid: tstringlist;
i, i2, i3: integer;
pck, id, id2: string;
procedure parse(s, delim: string; var test: TStringList);
var
p: integer;
z: string;
begin
z := s;
p := Pos(delim, z);
while p>0 do
begin
test.add(copy(z, 1, p-1));
delete(z, 1, p+length(delim)-1);
p := Pos(delim, z);
end;
if length(z)>0 then
test.add(z);
end;
procedure onCreate;
begin
s := tstringlist.create;
pid := tstringlist.create;
end;
begin
if pos('pid', _gBuf)>0 then
begin
s.clear;
parse(_gBuf, HStr('000D0A'), s);
for i:=0 to s.count-1 do
begin
pid.clear;
parse(s[i], '|', pid);
if pid[1]='C' then
begin
pid[6] := pid[6]+' - '+pid[2];
pck := '';
for i3:=0 to pid.count-1 do
pck := pck+pid[i3]+'|';
insert(pck, _gBuf, pos(s[i], _gBuf));
delete(_gBuf, pos(s[i], _gBuf), length(s[i]));
end;
end;
_gBuf := _gBuf;
end;
end.