Hello everyone, ive finished my script now, and i need to know how to make a downloader. I used the search button, which did not help at all. If someone could make a tutorial or if one exists, link me to it please.
Hello everyone, ive finished my script now, and i need to know how to make a downloader. I used the search button, which did not help at all. If someone could make a tutorial or if one exists, link me to it please.
SCAR Code:function CheckAndDownload(ScriptVersionURL, ScriptURL, ExactFileName : string) : boolean;
var
FileNum : Integer;
begin
GetPage(ScriptVersionURL);
Result:=GetPage(ScriptVersionURL) = ScriptVersion
If Result = true then
WriteLn('Version is the newest');
if Result = false then
begin
case GetApplication.Messagebox('Version ' + GetPage(ScriptVersionURL) + ' is the newest Version' + chr(13) + 'Download the New Version?' , 'Download Latest Version Of Script', 4) of
0 : begin
FileNum := ReWriteFile(ScriptPath + ExactFileName, true);
WriteFileString(FileNum, GetPage(ScriptURL));
CloseFile(FileNum);
GetApplication.MessageBox('The current version of ' + ExactFileName + ' has been successfully downloaded.' + chr(13) + 'Please reopen this script.', 'Please Reopen the Script', 0);
WriteLn('Now opening the script page');
OpenWebPage('http://www.google.com');
TerminateScript;
end;
end;
end;
end;
Ex:CheckAndDownload('http://colluciworld.freehostia.com/VersionChecker.txt', 'http://colluciworld.freehostia.com/TheScript.txt', 'Draynor Willow Chopper & Burner 1.0.scar') ;
@From a script never finnished.
There are currently 1 users browsing this thread. (0 members and 1 guests)