Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Like Mouse Hot Spots and Mouse Cursor Reporting, AutoMouse Programmable Translations have been largely superceded by GUI controls.

AutoMouse is a variation on the "SmartMouse technology" used in ZTERM. The idea is that when activated, A-Shell will attempt to make sense of any left double-click it receives. The way it does this is by identify the text "token" that was clicked on. For example, if you double click on a number, then it transmits that number into the keyboard buffer. That aspect of AutoMouse is more of a user feature than a development topic, so we won’t pursue it further here.

The AutoMouse Programmable Translations, on the other hand, relate to application development. The idea here is that your program may define its own special text tokens (arbitrary strings which may contains spaces and other delimiters) and associate them with specified keystrokes. This is similar in concept to the hot spots described previously, except that while hot spots are associated with specific positions on the screen, AutoMouse Programmable Translations are associated with specific text strings, wherever they may appear. AutoMouse Programmable Translations are maintained using a subroutine (MX_AMOUSEXLT) instead of via a Tab(-1,162) sequence as for hot spots. The flexibility of the subroutine interface offers the advantage of allowing the addition and deletion of individual translations (instead of having to do them all at once, as with hot spots). For a simple example, consider:

xcall MIAMEX, MX_AMOUSEXLT, 0, STATUS, 0, &

"1. Add Transaction", "1"+chr(13),  &

"2. Change Transaction","2"+chr(13), &

"3. Delete Transaction","3"+chr(13), &

"4. Post","4"+chr(13), &

"ESC to Return to Menu",27

This might make sense in a menu program featuring those options. While the default AutoMouse translations would handle the numeric options in this menu automatically, you would have to click right on the numbers. After the above call, the user would be able to click anywhere, for example, on "1. Add Transaction" to transmit a "1" followed by a carriage return. Clicking anywhere on the string "ESC To Return to Menu" would send an ESC. (Note we can specify the chr(27) for ESC simply as 27, since it is a single byte value.) The multi-byte translations require a literal or mapped string, or a string expression.

When beveling is enabled and the screen background is a suitable mid-level color (not black or white), clicking on an AutoMouse token will briefly "buttonize" the token, giving it the impression of having been pushed slightly in.

See the latest MIAMEX sample program for another example.