Download ashxcall 05 09 01
Transcript
calculation. That is, if the parent dialog uses MBF_ALTPOS, then any nested child dialog will automatically use the same spacing. But unless the child dialog also uses MBF_ALTPOS, its upper left corner will be positioned relative to its parent, and its bottom row usability will be related to the relationship between the row height and title bar height. Otherwise, if the child dialog does use MBF_ALTPOS, then itsupper left corner will be relative to the main window and use the same height logic, and thus if it has the same coordinates as the parent dialog, it will exactly overlay it. cmd (string, up to 199 characters) specifies the command, DLL, keystrokes, or object reference (according to ctype) associated with clicking on the control. The choices are: • Windows Command Line • Keyboard Commands • Shell execute Windows Command Line (MBF_CMDLIN) When launching a Windows command line (unrelated to A-Shell, such as the Windows calculator), it is often problematic to know the fully qualified path. If the command cannot be assumed to be in the default PATH (like NOTEPAD or CALCULATOR) or in the Registry (typical for newer installations of Office applications), then you’ll probably have to use an environment variable and insist that it be defined. For example, you might put your utilities in an arbitary folder but require as part of the installation procedure that an environment variable, say, ASHUTIL, be defined, then you can specify it in your command lines (e.g. “%ASHUTIL%\MYUTIL.EXE”). Or you can just require that the PATH environment variable be extended to include the directory where your special utilities are found. Another idea would be to install any such custom utilities in a directory with a known relation to the DSKn directories. Then you can refer to it using relative notation, e.g. “..\..\ashutils\myutil.exe”. (This would assume that the “ashutils” folder as a sibling to the DSKn folders.) If you are using the command line to launch another instance of A-Shell, as with XCALL HOSTEX, you can refer to the current A-Shell executable (and its current miame.ini file) via the macro symbol $ASHELL, and you can use the suffix characters available to HOSTEX. For example, "$ASHELL –e run armenu $" would launch a new A-Shell instance, run the program armenu, and suspend the current session until armenu exited. Keyboard Commands (MBF_KBD) Although you might find it convenient in menus to set your button or other control cmd strings to mimic what might otherwise be keypunched by the operator to make a menu selection, care must be taken to prevent the user from sending such “ordinary text” commands in the wrong context. The best way to avoid that problem is to define your keyboard cmd strings to send pseudo function key sequences. These will automatically be converted by INFLD (and other routines which wait for events, such as BTNMNU.SBR and AUI Eventwait) into exitcodes, and can be processed relatively easily by other character-level input routines. There are two formats for defining pseudo-function key sequences: page 34 A-Shell XCALL Reference