slushpuppy
2013-04-18 11:25:40
procedure CheckVersion;
var src,url,scriptName,currentVersion,tmp : String;
astr : TStringArray;
I : Integer;
X,Y : LongInt;
begin
scriptName := 'slushysuperheat'; //word Part of the filename
currentVersion := '02'; //numeric part of file name
url := 'http://villavu.com/forum/showthread.php?t=101409'; //url of script topic
src := GetPage(url);
src := Between('Attached Files</legend>','</fieldset>',src);
astr := Explode('</li>',src);
Y := 0;
for I := 0 to high(astr) do
begin
src := between('attachmentid=','&d=',astr[I]);
if src <> '' then X := StrToInt64(src) else X := 0;
if (X > Y) AND (Pos(scriptName,astr[I]) > 0) then
begin
Y := X;
tmp := astr[I];
end;
end;
if tmp = '' then writeln('['+scriptName+'] Warning URL not found');
I := Pos(scriptName,tmp);
if (I > 0) AND (PosEx(currentVersion,tmp,I) <> 0) then writeln('['+scriptName+'] Script update found, please update script here: ' + url);
end;
end.Just simply change
scriptName := 'slushysuperheat'; //word Part of the filename
currentVersion := '02'; //numeric part of file name
url := 'http://villavu.com/forum/showthread.php?t=101409'; //url of script topicThen add CheckVersion; Before setupSRL;
Please note that your script naming conventions must be in this format for this to work:
SCRIPTNAMEblahblahVERSION