|GSAK (Geocaching Swiss Army Knife)|
SysInfo(sName,[sOptions]) : String
sName - The name of the system data to retrieve (see list below)
sOptions - Currently can only be "csv" and applies to any sName that returns a "list" of values. Entering "csv" here will return the list in CSV format rather than just separated by a ; (semi colon). You can then read the values via the CsvGet() function. You would select this option when there is a chance that one of your returned values may contain a ; (semi colon). For more information see this link
sName items may include any of the following:
Centre - The name of your current centre point
CurrentUser - The name/account of the current api user
CurrentLanguage - The current language (as select via "Tools=>Options=>Advanced") for the user
Databases - List of all GSAK databases separated by a ; (semi colon) particularly useful to populate a combo box control when using the Form() macro function
Filters - List of all GSAK saved filters separated by a ; (semi colon) particularly useful to populate a combo box control when using the Form() macro function
Distance - Current user setting for distance units "K" = Kilometers, "M" = miles.
DPI - Return the screen "Dots per Inch" value.
Gsakini - This allows you to retrieve any value for Any setting in your GSAK.ini file. When using "gsakini" you need to pass two other pieces of information - the section and the item. Items need not be unique in the whole GSAK.INI file, but they must be unique within a section, hence the need for sections. Sections are denoted by  square brackets. You pass the section and item name using a ; (semi colon) to separate them. For example, if for some reason you wanted to retrieve the value used for matching the geocaching.com name the code would be:
$match = Sysinfo("gsakini;TfmConfig;EdtGeoName.Text")
You can browse the GSAK.INI file to determine which piece of information it is that you want to retrieve for any particular task.
Internet - Use to find out if you are currently connected to the Internet. Returns "yes" if connected, "no" if not
JoinFilter - Determine if the current active filter is a "join" filter. "Y" = Yes, "N" = No.
Locations - List of all your current locations (Tools=>Options=>Locations) separated by a (semi colon) particularly useful to populate a combo box control when using the Form() macro function. Note: This will return the full location details including coordinates. If you just want to populate your combobox with the location name only, use code like this:
MacroFile - returns the name of the currently running macro (this does not include the drive or path to the file name).
MacroPath - returns the full path to the currently running macro.
ScreenResolution - Returns the screen width and screen height separated by a , (comma).
S_Dialog - Retrieve a list of settings for any dialog. You would normally want to do this to populate a drop down box when creating a GSAK form. To get a ; (semi colon) delimited list of settings for any dialog, pass the name of the dialog preceded by "S_". Dialog names are the same as used in the MacroSet command. For example if you wanted a list of all the settings for your MapSource export the code would be:
ssFormats - returns a semi colon delimited list of Split screen formats
UserName - Current user name for this computer
Views - List of all GSAK saved views separated by a (semi colon) particularly useful to populate a combo box control when using the Form() macro function
WindowsFolder - List standard Windows folders. Use SysInfo("WindowsFolder:Name") where Name is the windows folder you want to retrieve. For example, to get the Windows Desktop folder the code would be:
$WindowsDesktop = SysInfo("WindowsFolder:Desktop"). There is a macro that lists the supported names that can be found more info, the output of which is:
Alpha List Category List
Copyright 2004-2016 CWE Computer Services |