SaveProgramOptions

<< Click to Display Table of Contents >>

Navigation:  Reference (Scripting) > Docklight Script Commands - The DL Object > Methods (Advanced) >

SaveProgramOptions

Saves the current Docklight program options (everything that can be adjusted in the Options dialog) and the active  communication window mode (ASCII, HEX, Decimal or Binary) to a file.

 

Return Value

 

Void

 

Syntax

 

DL.SaveProgramOptions filePathName

 

The SaveProgramOptions method syntax has these parts:

 

Part

Description

filePathName

Required. String containing the file path (directory and file name) of the Docklight settings file create. If no directory is specified, Docklight uses the current working directory. If filePathName is an empty string, a file dialog will be displayed to choose a file.

 

Remarks

 

A file created with SaveProgramOptions can be loaded using LoadProgramOptions. SaveProgramOptions creates XML files (.xml file extension).

 

SaveProgramOptions and LoadProgramOptions are very useful to ensure that Docklight uses specific display and time stamp settings for executing your Docklight script. This is great for automated testing tools that are intended for other users, who are not familiar with Docklight. You can prepare the appropriate display representation (e.g. HEX mode only) and make sure other users will receive the same display output as you did.

 

NOTE: Communication needs to be stopped (see StopCommunication) before using SaveProgramOptions or LoadProgramOptions.

 

Example

 

' Example SaveProgramOptions

DL.StopCommunication

DL.SaveProgramOptions "myFavoriteSettings"

DL.Quit

 

Now make some changes in the Docklight Options, or change the communication window, e.g. by selecting the Decimal tab. Then run the following script:

 

' Example LoadProgramOptions

DL.LoadProgramOptions "myFavoriteSettings"

 

Docklight will now revert to the display settings used before.