## WorkShop Visual Replay Command Syntax - Resource Evaluation

#### Keywords

- printres - print the value of a widget resource

#### Synopsis

        printres widget->resource

#### Inputs

- widget - the name of a widget
- resource - the name of the widget resource

#### Description

printres prints the current value of a specified resource within a selected widget. This is especially useful in test scripts, where a known resource value is expected. The name of the resource must be specified without any "XmN" prefix, e.g. "labelString".

Your scripts are more likely to include resource evaluation within conditional expressions.

#### Example

        in my_shell
    	if !my_option_menu->menuHistory:default_option
    	    message FAIL: bad setting for my_option_menu
    	    message Setting should be:
    	    printres my_option_menu->menuHistory:default_option
    	endif

See also:

- WorkShop Visual Replay Command Syntax