xcall MIAMEX, MX_AMOUSEXLT, opcode, status, flags, s1, t1, ... s10, t10
MX_AMOUSEXLT (MIAMEX 112) allows you to define or otherwise control AutoMouse translations within a program. AutoMouse is an A-Shell scheme, which can be activated or deactivated from the Edit menu, which allows the user to double-click on a text "token" anywhere on the screen to transmit those characters to the keyboard. A "token" is a string of characters delimited by any non-alpha, non-numeric characters (i.e. space or punctuation). This MIAMEX function allows you to extend or control this capability by creating translation strings that are not limited to "tokens" (as just defined) and which can transmit arbitrary text (rather than the characters of the string which is double-clicked on).
Parameters
opcode (Num)
should be set to one of the following:
Value |
Operation |
---|---|
0 |
Add (or create new) translation list |
1 |
Clear existing translations |
2 |
Temporarily disable translations |
3 |
Re-enable translations |
4 |
Disable intelligent doubleclick |
5 |
Restore doubleclick to state it was prior to last opcode 4 or 6. |
6 |
Enable intelligent doubleclick |
status (F6)
returns 0 on success, else an error code. Currently defined errors are –1 (cannot allocate memory for translations) and –2 (translations exceed memory limit of 2048 bytes).
The remaining arguments are only used if opcode=0.
flags (Num)
affect the way the translations work. Currently the only defined flag value is 1, which indicates that the translation is not case sensitive.
s1...s10
strings representing the text which may appear on the screen, to be clicked on and translated (to the corresponding t1...t10 values). Note that these strings may contain spaces and other non-alphanumeric characters, which would otherwise be considered delimiters. The maximum length of each string is 132 characters.
t1 through t10
strings containing the characters to be transmitted to the keyboard when the corresponding string (in s1 through s10) is double-clicked. They may also be specified as B or F variables, in which case the define the byte value of a single byte to be transmitted. (This may be more convenient than string representation when dealing with control characters, e.g. 1= Ctrl+A, 27=Escape, etc.).
You do not have to specify all 10 pairs of sn and tn strings, and even if you do, interpretation will stop at the first null sn string. There is no particular limit to the number of translation pairs you can define (using as many calls to this function as necessary). The total combined limit on the sn and tn strings is 2048 characters.
opcode 4, 5 and 6 are primarily of interest for eliminating the situation in which double-clicking on an empty part of a form sends a CR, which is treated the same as clicking on the currently focused button.