The CyberSecretary Object Library also includes methods and functions for easily reading and writing .INI files and Registry settings, avoiding the need to use Windows API calls.

.ReadINIFile "File", "Section", " Key"

This function is used to read values from Windows .INI files.

.WriteINIFile "File", "Section", "Key", "Value"

This method is used to write values to Windows .INI files.

.GetRegistryValue HKey, "Key", "Value"

This function is used to read settings from the Windows Registry.  Please note that presently only string values are supported.

.SetRegistryValue HKey, "Key", "Value", "Data"

This method is used to save settings to the Windows Registry.  Please note that presently only string values are supported.

.PlayGame "DataFile"

Your CyberSecretary would not be complete without a method "just for fun," to demonstrate your CyberSecretary's built-in artificial intelligence capabilities!  The .PlayGame method is a built-in guessing game in which you think of a person, place, or thing, and your CyberSecretary tries to guess the answer using Yes/No questions.  If your CyberSecretary does not guess correctly, your CyberSecretary will ask you to provide a question which he or she can use to distinguish his or her guess from the person, place or thing that you were thinking of.  Your CyberSecretary "remembers" this information and gets better with practice!

The parameter is a specially formatted game data file.  Usually this will be a text file with the .INI extension.  A game data file will begin with only one question and two guesses.  Here's an example.

[General]

Nouns=Common

Subject=animal

 

[Questions]

Number=3

1=Does it swim?

2=Is it a shark?

3=Is it a tiger?

 

[Yes]

1=2

 

[No]

1=3

Note the following: