Contents
- Index
- Previous
- Next
Interfacing FTBasic with other programs
FTBasic stores certain operating information in the Windows registry for access by other programs. This information is continuously updated and may be read at any time.
The location in the registry is HKEY_CURRENT_USER\Software\VB and VBA Program Settings\FTBasicRegKey
FTBasicRegKey is either "FTBasic" or, if multiple configurations are used, the configuration name as defined in Multiple rigs and/or configurations.
SaveSetting FTBasicRegKey, "CurrentValues", "Frequency", Frequency
SaveSetting FTBasicRegKey, "CurrentValues", "Mode", Mode
SaveSetting FTBasicRegKey, "CurrentValues", "Date", DateStamp
SaveSetting FTBasicRegKey, "CurrentValues", "Time", TimeStamp
SaveSetting FTBasicRegKey, "CurrentValues", "RigType", ""
SaveSetting FTBasicRegKey, "CurrentValues", "Status", ""
The fields are all character, and the formats are:
Status "Inactive" or "Active"
RigType "FT100" or "FT817" or "FT847" or "FRG100" etc.
Frequency "mmm.kkk.th" e.g. 145.575.00
Mode "cccc" e.g. CW, FM, LSB etc
Date "yyyy/mm/dd" e.g. 2001/06/30
Time "hh:mm:ss" e.g. 15:37:57
This information may be read in another program using the following code:
Frequency = GetSetting (FTBasicRegKey, "CurrentValues", "Frequency", "")
Mode = GetSetting (FTBasicRegKey, "CurrentValues", "Mode", "")
DateStamp = GetSetting (FTBasicRegKey, "CurrentValues", "DateStamp", "")
TimeStamp = GetSetting (FTBasicRegKey, "CurrentValues", "TimeStamp", "")
RigType = GetSetting (FTBasicRegKey, "CurrentValues", "RigType", "")
Status = GetSetting (FTBasicRegKey, "CurrentValues", "Status", "")