Skip to main content

Can a PRACTICE script be executed when double-clicking a variable or function name within the List window? - Knowledgebase / TRACE32 PowerView - Lauterbach Support

Can a PRACTICE script be executed when double-clicking a variable or function name within the List window?

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
)
Note

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

Helpful Unhelpful

1 of 1 people found this page helpful

Add a comment

ID-0
To prove you are a human, please tell us the text you see in the CAPTCHA image