Rich
2009-06-20 18:14:56
In this tutorial I am going to teach you how to create a version checker for your scripts. First off, you are going to need to create a Notepad file. In this, you will type the version of your script. Example:
Now you will need to create a webpage to host this on. For my version checker, I use Webs.
Once on Webs, you will see a screen with this

on it.
Enter what you want your website to be called. This is normally something to do with the script itself. Also enter a password. You must remember both of these for future reference.
After the form completion, you will see this

Click on the circle tick box.
Now, near the top of the screen, there is

Click on the circled area.
Somewhere on your screen, there is this

Click on "File Manage" (the circled area).
Now click on "Single File Uploader".

Now this pop-up will show.

Find where you saved Version.txt, click on it, the press "Open".
Then press "Upload File".

Now you should see something like this

If you need to edit the version, then click on the circled area, and change
Start of by declaring your procedure, and two string variables.
Then you begin the procedure, and tell the script what version it is.
Anyway, now we find the version of the web-page you set up earlier, from Version.txt, and check whether it matches the version declared in the script.
What this does is gets what Version.txt says, and check whether they don't match. That's what <> does. If the version declared in the script doesn't match with the one it finds in Version.txt, it will
What about news?
Have you seen scripts which come up with the updates from that version, and thought it was amazing? Well, it makes the script look good, but it is soooo easy.
Like for the version checker, open Notepad. Put in your news.
Upload it onto your website, just like with Version.txt. Again, you can edit it with the edit button.
Now open SCAR, and make a procedure like this.
Easy!
Well, that's all from me for this tutorial. I hope it helped you, and if you need any help, please let me know.
Thanks,
Richard
1.1Then save it as Version.txt.Now you will need to create a webpage to host this on. For my version checker, I use Webs.
Once on Webs, you will see a screen with this

on it.
Enter what you want your website to be called. This is normally something to do with the script itself. Also enter a password. You must remember both of these for future reference.
After the form completion, you will see this

Click on the circle tick box.
Now, near the top of the screen, there is

Click on the circled area.
Somewhere on your screen, there is this

Click on "File Manage" (the circled area).
Now click on "Single File Uploader".

Now this pop-up will show.

Find where you saved Version.txt, click on it, the press "Open".
Then press "Upload File".

Now you should see something like this

If you need to edit the version, then click on the circled area, and change
1.1to1.2That's the web-page related bit done. Now for the SCAR part.Start of by declaring your procedure, and two string variables.
procedure VerCheck;
var
Version, Ver : string; Then you begin the procedure, and tell the script what version it is.
begin
Ver:= '1.1'; //DO NOT CHANGE UNLESS YOU WANT AN OUTDATED VERSION!Write in the "DO NOT CHANGE…", because someone out there will change it, and then start complaining that it is telling them they have an outdated version, when they don't.Anyway, now we find the version of the web-page you set up earlier, from Version.txt, and check whether it matches the version declared in the script.
Version:= GetPage('http://WhatYouTypedInForYourAddress.webs.com/Version.txt');
if Version <> Ver thenWhat this does is gets what Version.txt says, and check whether they don't match. That's what <> does. If the version declared in the script doesn't match with the one it finds in Version.txt, it will
begin
ClearDebug;
WriteLn('');
WriteLn('Your version is not the latest. Get the latest version from:');
WriteLn('The Link To The Thread Of Your Script');
WriteLn('');
TerminateScript;
end elseAnd if they do match…WriteLn('You are up to date!');
Wait(3500);
ClearDebug;
end;What about news?
Have you seen scripts which come up with the updates from that version, and thought it was amazing? Well, it makes the script look good, but it is soooo easy.
Like for the version checker, open Notepad. Put in your news.
Updates:
- Added news!
- Fixed bugs.
- Other updates you might have made!Save it as News.txt.Upload it onto your website, just like with Version.txt. Again, you can edit it with the edit button.
Now open SCAR, and make a procedure like this.
procedure NewsFlash;
var
News : string;
begin
News:= GetPage('http://WhatYouTypedInForYourAddress.webs.com/News.txt');
WriteLn(News);
Wait(10000);
ClearDebug;
end;Easy!
Well, that's all from me for this tutorial. I hope it helped you, and if you need any help, please let me know.
Thanks,
Richard