Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.11.18;
Скачать: CL | DM;

Вниз

Ошибка в коде   Найти похожие ветки 

 
Pacific   (2007-10-26 17:41) [0]

Здравствуйте! Немогли бы Вы помочь мне найти ошибку в коде.
Задача: random брать proxy из файла, а также random ссылку и заходить на данную ссылку через proxy.
Вот код:

procedure threed.Execute;
var
randomh, randomp, proxyhost, proxyport:string;
proxy:Tstrings;
x,y:integer;
ok,o:integer;
begin
while form1.start=True do
begin
randomh:=form1.Memo1.Lines.Strings[random(form1.Memo1.Lines.Count-1)];
proxy:=Tstringlist.Create;
proxy.LoadFromFile(form1.Edit1.Text);
randomp:=proxy.Strings[random(proxy.Count-1)];
proxy.Free;
x:=Pos(":", randomp);
proxyhost:=copy(randomp, 1, x-1);
proxyport:=copy(randomp, x+1, 255);
form1.IdHTTP1.ProxyParams.ProxyPort:=strtoint(proxyport);
form1.IdHTTP1.ProxyParams.ProxyServer:=proxyhost;
try
ok:=strtoint(form1.Label9.caption);
Inc(ok);
form1.Label9.Caption:=inttostr(ok);
except
o:=strtoint(form1.Label7.caption);
Inc(o);
form1.Label7.Caption:=inttostr(o);
end;
end;
end;


 
Reindeer Moss Eater ©   (2007-10-26 17:54) [1]

весь твой код - одна сплошная ошибка.


 
Pacific   (2007-10-26 17:58) [2]

ну хоть объяснить можете что я делаю не так?


 
Reindeer Moss Eater ©   (2007-10-26 18:00) [3]

x:=Pos(":", randomp);
proxyhost:=copy(randomp, 1, x-1);
proxyport:=copy(randomp, x+1, 255);

А если попалась строка без ":"  ?


 
Virgo_Style ©   (2007-10-26 20:19) [4]

Reindeer Moss Eater ©   (26.10.07 18:00) [3]

начинаешь с середины? %-)


 
Pacific   (2007-10-26 20:48) [5]

там везде :
127.0.0.1:80 пример :)



Страницы: 1 вся ветка

Текущий архив: 2007.11.18;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.023 c
4-1178967178
Дмиитрий Белькевич
2007-05-12 14:52
2007.11.18
Сеанс терминальной сессии


15-1192520467
Azize
2007-10-16 11:41
2007.11.18
QDialogs


3-1183620291
ambhtr
2007-07-05 11:24
2007.11.18
Помогите составить запрос


15-1192447780
botaniQ
2007-10-15 15:29
2007.11.18
Структура WAV -файла...


1-1188216598
временный Чайник
2007-08-27 16:09
2007.11.18
Как в Viste удалить файл в Program Files