Yes, this can be achieved using the TRACE32 command SETUP.LISTCLICK
.
To execute the PRACTICE script listclick.cmm
when double-clicking a variable or function name, use the following command:
SETUP.LISTCLICK "DO listclick.cmm *"
The appended *
ensures that the clicked item is passed as a parameter to the script. The script will be executed automatically without prompting for additional input. You can retrieve and process this parameter in the script using the ENTRY
command.
For example, the script can perform the following actions:
Display a warning if the double-clicked expression cannot be resolved in the current context.
Open the
Var.View
window if the expression is a variable.Open an external
List
window if the expression is a function.
Here’s an example of how listclick.cmm
can be implemented:
ENTRY &expr
IF !sYmbol.EXIST(&expr)
(
PRINT "warning: expression not found"
)
ELSE IF sYmbol.ISVARIABLE(&expr)
(
Var.View &expr
)
ELSE IF (sYmbol.ISFUNCTION(&expr))
(
WinExt.List &expr
)
If you want the script to prompt for additional input in the TRACE32 command line before execution, use ?
instead of *
. This requires pressing Enter to confirm execution. Example:
SETUP.LISTCLICK "DO listclick.cmm ?"
For more details, refer to the description of the SETUP.LISTCLICK
command in the General Commands Reference Guide S
Add a comment