I just wanted to get the source of the webpage to a string. Just like GetPage works in scar.
But basicly I want this:
SCAR Code:
program New;
procedure FillUp;
var
S, HeroName, StatName, Stat: string;
SA, SAI: TStringArray;
H, i, o, p: Integer;
begin
SAI := ['<li class="cat" style="width: 170px;">Movement Speed</li>', +
'<li class="cat" style="width: 170px;">Str per Level</li>', +
'<li class="cat" style="width: 170px;">Agi per Level</li>', +
'<li class="cat" style="width: 170px;">Int per Level</li>', +
'<li class="cat" style="width: 170px;">Armor</li>', +
'<li class="cat" style="width: 170px;">Dmg. Reduction</li>', +
'<li class="cat" style="width: 170px;">Magic Armor</li>', +
'<li class="cat" style="width: 170px;">Magic Dmg. Reduction</li>'];
for p := 0 to 116 do
begin
S := GetPage('http://www.heroesofnewerth.com/heroview.php?hid=' + IntToStr(p) + '');
HeroName := Between('Hero Name</b></span><br>', '<br>', S);
if HeroName = '' then Continue;
WriteLn(HeroName + ':' + #13);
SA := Explode(#10, S);
H := High(SA);
for o := 0 to 7 do
begin
for i := 0 to H do
begin
if Pos(SAI[o], SA[i]) > 0 then
begin
StatName := Between('>', '<', SAI[O]);
Stat := Between('>', '<', SA[i + 2]);
WriteLn(StatName + ': ' + Stat);
WriteINI(HeroName, StatName, Stat, ScriptPath + 'HeroDatabase.ini');
Break;
end;
end;
end;
WriteLn(#13);
end;
end;
var
f: Integer;
begin
FillUp;
end.
in VB.
But I don't want you just to give me a full working program because I won't learn from that too much.
EDIT: I got it now with fronty's method. Although it's not in a string, yet.