SRL Archive - SRL Snippets

DisplayUpdateNotes


Kevin

2013-06-18 10:57:48

I've noticed a few scripts here and there that use auto-updaters, and here I've come up with a little method for displaying your update notes to the user on update in a little message box.


procedure GetUpdateNotes(versionRemote: string);
var
updateNotes: string;
begin
updateNotes:= GetPage('SomePageStoredAlongsideYourActualUpdatedScript');
if((updateNotes = '') or (pos('<!DOCTYPE HTML PUBLIC', updateNotes) = 1))then
begin
WriteLn('Update notes were not found. Sorry.');
Exit;
end;
MessageBox(updateNotes, ('Update Notes V' + versionRemote), 0);
end;