TrueUpdate.GetServerFile

boolean TrueUpdate.GetServerFile ( 

string   ServerID,

boolean  ShowRestartDialog = true,

function CallbackFunction = nil )

Example 1

bLoaded = TrueUpdate.GetServerFile("TrueUpdate Server 1", true, nil);

Gets the server configuration files from "TrueUpdate Server 1", and loads them automatically once they are downloaded.

Example 2

tUpdateServers = TrueUpdate.GetUpdateServerList();
nMaxServers = Table.Count(tUpdateServers);

bValidServer = false;
nServerNo = 1;

while (not bValidServer) do
    bValidServer = TrueUpdate.GetServerFile(tUpdateServers[nServerNo], true, nil)
    if (not bValidServer) then
        nServerNo = nServerNo + 1;
    end
    if (nServerNo > nMaxServers) then
        Dialog.Message("Error", "All attempts at downloading a server configuration file have failed.  Update will now terminate");
        Application.Exit();
    end
end

Gets a list of all available TrueUpdate Servers and attempts to get the server configuration files from each one until a valid server is found.  If no server can be connected to, an error is displayed, and the update exits.

See also:  Related Actions