Updated 2010 August
Get or set values:
xcall MIAMEX, MX_WINSETTINGS, opcode, id, value
Save settings file:
xcall MIAMEX, MX_WINSETTINGS, opcode, file, status
Load settings file:
xcall MIAMEX, MX_WINSETTINGS, opcode, file, file2
(ATE/Windows) MX_WINSETTINGS is used to get or set a number of options associated with the Misc Settings and Dialog Sizing dialogs. Set opcode to 0 to retrieve a value or 1 to set it. The ID codes and associated range of values are shown below. Note that the AWS_xxx symbols have been added to ashell.def.
.
opcode (Num) [in]
0 to retrieve a value, 1 to set a value (first syntax above); 2 to save the current values to disk (second syntax above); 3 to load a new set of values from disk (third syntax above)
When used with id 0, returns a comma-delimited string of all the available values. This is much faster than retrieving each value one at a time over ATE, where there could be a several ms latency for each command/response turnaround. Note that the comma-delimited string will have a place for each setting by ID value, from 1 to the maximum ID.
id (Num) [in]
Identifies the item for which the corresponding value will be set or retrieved. The choices for id are listed in the Symbol column in the following table.
value (Num or String) [in/out]
Specifies the value to set (if opcode=1) or returns the value being retrieved (if opcode=0). The data type should correspond to the type of the associated item. Most items are numeric integers, except for the font name values. For items that correspond to on/off options (checkboxes in the Misc. Settings Dialog), 1=on (checked), 0=off (unchecked).
file (String) [in]
For opcodes 2 and 3, file specifies the full or partial filespec of the settings file to save to or load from. If null, the current default filespec is used.
file2 (String) [out]
For opcode 3, file2 returns the fully qualified settings file name (possibly useful if file left blank or partial, or if the file referenced by file was not present and a different settings file from the search order was specified.) See the File > Save dialog for information about the search order for settings files.
status (Signed Num) [out]
For opcode 2, returns 0 if the save operation was a success, -15 if ATE fails to respond in a reasonable time.
Symbol |
Value |
Type |
Description |
AWS_LEADING |
1 |
Numeric |
Leading (pixels between rows) |
AWS_LEADCLR |
2 |
Numeric |
Leading color fill (color number or -1,-2) AWS_LEADCLR_AUTO (-1) AWS_LEADCLR_PASSIVE (-2) |
AWS_FONTSCALE |
3 |
Numeric |
Font scale factor |
AWS_MINMAXMARGIN |
4 |
Numeric |
Minimum margin when maximized |
AWS_FIXEDPITCHEDIT |
5 |
Numeric |
Use fixed pitch in edit boxes (1=on, 0=off) |
AWS_WININFCLR |
6 |
Numeric |
Use std Windows colors in edit boxes (1=on, 0=off) |
AWS_EDITLEADING |
7 |
Numeric |
Extend edit boxes into leading area (1=on, 0=off) |
AWS_CBEDITMATCH |
8 |
Numeric |
Set edit boxes to combo height (1=on, 0=off) |
AWS_DLGGRIDBASIS |
9 |
Numeric |
Dialog size based on... AWS_DLGGRIDBASIS_FONTSIZE (0) AWS_DLGGRIDBASIS_WINDOWSIZE (1) AWS_DLGGRIDBASIS_PROGCTL (2) |
AWS_DLGGRIDHEIGHT |
10 |
Numeric |
Dialog grid height (% of font size) |
AWS_DLGGRIDWIDTH |
11 |
Numeric |
Dialog grid width (% of font size) |
AWS_BEEPCODE |
12 |
Numeric |
Default beep sound with char(7): AWS_BEEPCODE_DEFAULT (0) AWS_BEEPCODE_HAND (16) AWS_BEEPCODE_QUESTION (32) AWS_BEEPCODE_EXCLAM (48) AWS_BEEPCODE_ASTERISK (64) |
AWS_DLGFONTSCALE |
13 |
Numeric |
ALTPOS dialog font scale |
AWS_DLGCAPTINC |
14 |
Numeric |
Include caption in dialog height (1=on, 0=off) |
AWS_WININFBGC |
15 |
Numeric |
RGB background color for active edits |
AWS_FONTFACE |
16 |
String |
A-Shell fixed pitch font |
AWS_GUI_FONTFACE |
17 |
String |
A-Shell GUI font (blank for Windows default) |
|
|
|
|
|
|
|
|
AWS_CHARSET |
20 |
Numeric |
Sets and retrieves the current display character set. Valid choices are 0 for ANSI and 255 for OEM. Note that the character set is usually established in miame.ini (default is OEM) with the FONT=fontname,charset command. Once set, changing fonts doesn't usually change the character set. |
AWS_XTR_FONTFACE |
21 |
String |
XTREE default font |
Definition file: ashell.def |
Examples
To change the default beep code to the system "asterisk" sound:
xcall MIAMEX, MX_WINSETTINGS, 1, AWS_BEEPCODE, AWS_BEEPCODE_ASTERISK
To re-load the settings from the current settings file (returning the full filespec of that file in FSPEC2$):
xcall MIAMEX, MX_WINSETTINGS, 3, "", FSPEC2$
To save the current (possibly updated) settings to the specified file:
xcall MIAMEX, MX_WINSETTINGS, 2, "%MIAME%\new.ash"", status
Notes
All of the options listed above, other than beepcode, may be set via the dialogs directly. In the case of the beepcode, the command changes the code that is used when a chr(7) is output, but you can still determine what waveform is associated with that code in the Windows Control panel Sounds applet.
Also note even though the beepcode may not be seen or edited in the dialogs, it is still saved and retrieved along with the other settings (File > Save).