13-04-2017, 11:51 PM
مع انك تستطيع جلب ما تريد مباشرة من الاداة TWEB ولكن على العموم
انت بحاجة الى البحث عن كلمات اساسية متواجدة دائما
وعندك الكلمة الاولى هي HTTP ونهاية الكلمة هي .JPG
اذا تبحث عن الكلمة الاولى وتعرف موقعها وكذلك مع الثانية
تم تقوم بنسخ الجملة التي تقع بين العددين
لا اعرف لضيق الوقت اجريت اختبار سريع لمثال يبدوا انه نفسه الذي معك وعدلت فيه قليلا
حاول ان تجربه اكثر من مرة
![[صورة: 0dde133f6e1b616.jpg]](http://www.m5zn.com/newuploads/2017/04/13/jpg//0dde133f6e1b616.jpg)
انت بحاجة الى البحث عن كلمات اساسية متواجدة دائما
وعندك الكلمة الاولى هي HTTP ونهاية الكلمة هي .JPG
اذا تبحث عن الكلمة الاولى وتعرف موقعها وكذلك مع الثانية
تم تقوم بنسخ الجملة التي تقع بين العددين
لا اعرف لضيق الوقت اجريت اختبار سريع لمثال يبدوا انه نفسه الذي معك وعدلت فيه قليلا
حاول ان تجربه اكثر من مرة
![[صورة: 0dde133f6e1b616.jpg]](http://www.m5zn.com/newuploads/2017/04/13/jpg//0dde133f6e1b616.jpg)
كود :
var
i,k1,k2: Integer;
a: string;
begin
edt2.Text:='https';
mmo1.Lines.Add('');
mmo1.Lines.Text := ' ' + mmo1.Lines.Text;
for i := 0 to Length(mmo1.Lines.Text) - Length(edt2.Text) do
begin
a := Copy(mmo1.Lines.Text, i, Length(edt2.Text));
if chk1.Checked = True then
begin
if a = edt2.Text then
begin
find := True;
x := 2;
mmo1.Lines.Text := Copy(mmo1.Lines.Text, 2, Length(mmo1.Lines.Text) - 1);
mmo1.SetFocus;
mmo1.SelStart := i - 2;
mmo1.SelLength := Length(edt2.Text);
break;
end;
end
else
begin
if lowercase(a) = lowercase(edt2.Text) then
begin
mmo1.Lines.Text := Copy(mmo1.Lines.Text, 2, Length(mmo1.Lines.Text) - 1);
find := True;
x := 2;
mmo1.SetFocus;
mmo1.SelStart := i - 2;
mmo1.SelLength := Length(edt2.Text);
break;
end;
end;
end;
k1:=i;
edt2.Text:='.jpg';
i:=0;
mmo1.Lines.Add('');
mmo1.Lines.Text := ' ' + mmo1.Lines.Text;
for i := 0 to Length(mmo1.Lines.Text) - Length(edt2.Text) do
begin
a := Copy(mmo1.Lines.Text, i, Length(edt2.Text));
if chk1.Checked = True then
begin
if a = edt2.Text then
begin
find := True;
x := 2;
mmo1.Lines.Text := Copy(mmo1.Lines.Text, 2, Length(mmo1.Lines.Text) - 1);
mmo1.SetFocus;
mmo1.SelStart := i - 2;
mmo1.SelLength := Length(edt2.Text);
break;
end;
end
else
begin
if lowercase(a) = lowercase(edt2.Text) then
begin
mmo1.Lines.Text := Copy(mmo1.Lines.Text, 2, Length(mmo1.Lines.Text) - 1);
find := True;
x := 2;
mmo1.SetFocus;
mmo1.SelStart := i - 2;
mmo1.SelLength := Length(edt2.Text);
break;
end;
end;
end;
k2:=i;
mmo1.SelStart := k1-2 ;
mmo1.SelLength := k2-k1+Length(edt2.Text) ;
// ShowMessage('');
mmo1.SetFocus;
// mmo1.SelStart := i - 2;
end;
قل: اللهم فاطِرَ السماوات والأرض عالم الغيبِ والشهادة، ربَّ كُلِّ شَيءٍ ومَلِيكَه، أَشْهد أن لا إله إلا أنت، أعوذ بك من شرِّ نفسي وشرِّ الشيطان وشِرْكِهِ وأن أقترف على نفسي سوءًا أو أجرُّه إلى مسلم


![[-]](https://delphi4arab.net/forum/D4A2020/collapse.png)