Classes

<< Click to Display Table of Contents >>

Navigation:  Using SyncBackPro > Technical Reference > Scripting >

Classes

Previous pageReturn to chapter overviewNext page

 

A number of built-in scripting classes are available. See also Script Functions.

 

All the example code below is written in using the Pascal scripting language.

 


Class TEnumVariant

 

TEnumVariant is a helper class for collections, e.g. FileSystemObject.Drives

 

Create the object by passing the collection. Then you call ForEach to get each item in the collection. For example:

 

    //

    // Return the list of drives

    //

    DrivesEnum:=TEnumVariant.Create(gFSO.Drives);

    try

      while DrivesEnum.ForEach(DiskDrive) do begin

        If (DiskDrive.IsReady = TRUE) then

          If not SBLocation.AddDir(DiskDrive.DriveLetter) then

            Exit;

      end;

    finally

      DrivesEnum.Free;

    end;

 

See the AllDrives.pas example script for an example.

 

 

Class TStringList

 

This class is for storing lists of strings. For more information refer to the Delphi help entry for TStringList.

 

 

 

 

 

All Content: 2BrightSparks Pte Ltd © 2003-2019