На Unit3 в запросе подчеркнуто красным + token); в самом конце запроса. Если добавляю глобальную переменную token то подчеркивание пропадает, но при компиляции появляется новая ошибка в item:=SO(response); Вот ссылка на исходник https://cloud.mail.ru/public/NGVN/4w9LXsFhN Код главной формы. Code: unit Unit2; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, sSkinManager, Vcl.StdCtrls, sButton, sEdit, sGroupBox, sMemo, sLabel, httpsend, lib, syncobjs; type TForm2 = class(TForm) sSkinManager1: TsSkinManager; sGroupBox1: TsGroupBox; sEdit1: TsEdit; sEdit2: TsEdit; sButton1: TsButton; sGroupBox2: TsGroupBox; sMemo1: TsMemo; sGroupBox3: TsGroupBox; sButton2: TsButton; sButton3: TsButton; sGroupBox4: TsGroupBox; sGroupBox5: TsGroupBox; sButton4: TsButton; sButton5: TsButton; sLabel1: TsLabel; sLabel2: TsLabel; sLabel3: TsLabel; sLabel4: TsLabel; sLabel5: TsLabel; sLabel6: TsLabel; sLabel7: TsLabel; sLabel8: TsLabel; procedure sButton2Click(Sender: TObject); procedure sButton3Click(Sender: TObject); procedure sButton1Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure sButton4Click(Sender: TObject); procedure sButton5Click(Sender: TObject); private { Private declarations } public { Public declarations } end; Vkramp = class(TThread) private screen_name:string; Proxys, CurAcc:integer; Rez:integer; protected procedure Execute; override; public procedure Synс; End; var Form2: TForm2; HTTP:thttpsend; response, token:string; STRTime:string; Work:boolean; CS:TCriticalSection; Acc, Thread:integer; implementation {$R *.dfm} uses Unit3, Unit4; procedure Vkramp.Execute; var i:integer; tmp:tstringlist; gid:string; begin while Work do begin Cs.Enter; Inc(Acc); if Acc<gids.Count then CurAcc:=Acc else Work:=False; Cs.Leave; if Work then begin tmp:=tstringlist.Create; HTTP:=tstringlist.Create; gid:= gids[CurAcc]; if HTTP.HTTPMethod('GET', 'https://api.vk.com/method/wall.post?owner_id=-'+gid+'&message=' +Form4.sMemo1.Text+ '&access_token=' + token) then begin tmp.LoadFromStream(HTTP.Document); screen_name:= 'https://vk.com/club'+gid; if Pos('post_id', tmp.Text)<>0 then begin Rez:=1; end else if Pos('captcha', tmp.Text)<>0 then Rez:=2 else Rez:=0; end else Rez:=2; end; FreeAndNil(HTTP); if (rez=1) then Sleep(5000); Synchronize(Sync); end; Dec(Thread); if Thread = 0 then begin Form2.sEdit1.Enabled:=true; Form2.sEdit2.Enabled:=true; Form2.sButton1.Enabled:=true; Form2.sButton2.Enabled:=true; Form2.sButton3.Enabled:=true; end; end; procedure Vkramp.Sync; begin case rez of 1:Begin STRTime:=TimeToStr(Time); Form2.sMemo1.Lines.Add('[' + STRTIME + '] Публикация [' + screen_name + ']'); Form2.sLabel7.Caption:=inttostr(string(Form2.sLabel7.Caption)+1); End; 2:Begin STRTime:=TimeToStr(Time); Form2.sMemo1.Lines.Add('[' + STRTIME + '] Капча [' + screen_name + ']'); Form2.sLabel5.Caption:=inttostr(string(Form2.sLabel5.Caption)+1); End; 0:Begin Form2.sLabel6.Caption:=inttostr(string(Form2.sLabel6.Caption)+1); End; end; end; procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction); begin CS.Free; end; procedure TForm2.FormCreate(Sender: TObject); begin CS:=TCriticalSection.Create; end; procedure TForm2.sButton1Click(Sender: TObject); var temp, login, pass:string; begin STRtime:=TimetoStr(Time); login:=sEdit1.text; pass:=sEdit2.text; HTTP:=thttpsend.Create; response:=send('GET', 'https://oauth.vk.com/token?grant_type=password&client_id=2274003&client_secret=hHbZxrka2uZ6jB1inYsH&username='+login+'&password='+pass+'&captcha_key=&captcha_sid='); if Pos('token', response)<>0 then begin temp:=copy(response, pos('access_token":"', response), pos('","expires_in', response)-3); delete(temp, 1, 15); token:=temp; sMemo1.Lines.Add('[' + STRtime + ']Авторизация успешна'); sGroupBox3.Enabled:=true; sGroupBox4.Enabled:=true; sButton4.Enabled:=true; end else sMemo1.Lines.Add('[' + STRtime + '] Ошибка авторизации' + response); end; procedure TForm2.sButton2Click(Sender: TObject); begin Form3.ShowModal(); end; procedure TForm2.sButton3Click(Sender: TObject); begin Form4.ShowModal(); end; procedure TForm2.sButton4Click(Sender: TObject); var i:integer; begin STRtime:=TimetoStr(Time); for i := 1 to Length(STRTime) do sLabel5.Caption:='0'; sLabel6.Caption:='0'; sLabel7.Caption:='0'; sEdit1.Enabled:=false; sEdit2.Enabled:=false; sButton1.Enabled:=false; sButton2.Enabled:=false; sButton3.Enabled:=false; sButton5.Enabled:=true; Work:=true; for i := 1 to 1 do Vkramp.Create(false); end; procedure TForm2.sButton5Click(Sender: TObject); begin Work:=false; sButton5.Enabled:=false; end; end. Код поиска Code: unit Unit3; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, sRadioButton, sGroupBox, sButton, sMemo, sEdit, sLabel, sSpinEdit, superobject, httpsend, lib; type TForm3 = class(TForm) sGroupBox1: TsGroupBox; sRadioButton1: TsRadioButton; sRadioButton2: TsRadioButton; sRadioButton3: TsRadioButton; sEdit1: TsEdit; sGroupBox2: TsGroupBox; sMemo1: TsMemo; sGroupBox3: TsGroupBox; sButton1: TsButton; sSpinEdit1: TsSpinEdit; sLabel1: TsLabel; procedure sButton1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form3: TForm3; gids:tstringlist; STRTime, response, token:string; implementation {$R *.dfm} procedure TForm3.sButton1Click(Sender: TObject); var count:integer; item, item2:TSuperObject; begin gids:=tstringlist.Create; sMemo1.Lines.Clear; STRTime:=TimetoStr(Time); response:=send('GET', 'https://api.vk.com/method/groups.search?q='+sEdit1.text+'&type=group&count='+sSpinEdit1.text+'&access_token=' + token); if Pos ('response', response)<>0 then begin item:=SO(response); item:=item.O['response']; for item2 in item do begin if (item2.S['is_closed'] = 0) then begin sMemo1.Lines.Add('https//vk.com/' + item2.S['screen_name']); gids.Add(item2.S['gid']); sGroupBox2.Caption:= 'Лог [ '+inttostr(gids.Count)+']'; end; end; end else sMemo1.Lines.Add('[' + STRTime + '] Ошибка'); end; end. Prt Sc