Reviewed and revised December 2023
To retrieve (get) a specific value (opcode 0):
writecd tab(-10, AG_WINSETTINGS); opcode, id, , rtnflg; chr(127); Tab(-10,x) Syntax Notes
To update (set) a specific value (opcode 1):
writecd tab(-10, AG_WINSETTINGS); opcode, id, value; chr(127);
To load or save complete settings file (opcodes 2 and 3)
writecd tab(-10, AG_WINSETTINGS); opcode, fspec; chr(127);
AG_WINSETTINGS (46) retrieves or updates individual configuration settings—the types of settings that may be set in the Settings menu dialogs and saved or loaded from the File menu options—as well as saving or loading the entire set of values.
This function has both a subroutine and a print tab implementation.
Because the syntax is a bit tricky, in most cases it will be preferable to use MX_WINSETTINGS.
Parameters
opcode
retrieve a settings value; 1) set a value; 2) save the current values to disk; 3) load a new set of values from disk
id
identifies the individual settings parameter to retrieve or update; see the table MX_WINSETTINGS.
value
specifies the string or numeric value to set for the specified parameter. Leave blank for opcode 0.
rtnflg
specifies the file to load from or save to. If left blank, the current settings file will be used.
fspec (opcode 0 only)
must be set to 1 to enable a response
Response
depends on opcode, per the following table:
Opcode |
Response |
Description |
---|---|---|
0 |
Value <CR> |
Current value of the setting identified by id |
1 |
none |
|
2 |
status <CR> |
0 for success, -15 for timeout, else other error |
3 |
Fspec, fgc, bgc <CR> |
Fully qualified settings file name (mainly useful if empty or partial fspec passed), followed by the current foreground and background palette color indices. |
See Also