Application icon

Set Action Runtime Setting

You may want to save persistent settings for some of your actions. Yate provides a special access mechanism to read and write these settings. Action Runtime Settings are described in Action Runtime Settings.

The set being manipulated is always the set mapped via the Map Action Runtime Settings statement.

This statement is used to set the value of a setting. Note that # characters are removed from names at runtime. If a setting is assigned an empty value, the setting will be removed and is subsequently treated as an empty value. You cannot set multi-line values. Values will be truncated at the first occurrence of any newline character.

If the setting is named # and the value is empty, the entire set will be removed.

There is one possible situation where you might want to store empty values. If you are using a Get Info statement to save a set to named variables, you might want the items with empty values to be present so that the empty named variables are cleared. You can allow the storage of an empty setting by prefixing the name with a # character. Note that the # character is not actually part of the name.

The writing of an Action Runtime Setting is less efficient than storing a Named Variable. While Action Runtime Settings can be treated as Named Variables, it is not recommended that you do so.

Both text fields may contain any of the escape sequences described in Escape Sequences.

You can also use this statement to set multiple items by extracting them from a key-value list. The setting must be named ##. The to field must contain the key-value list. This will typically be done by specifying a named variable which contains the key-value list. Note that the specified items are added and none of the previous special modes can be specified. If any item has no data after the \k sequence, it will be written and preserved as if the key was preceded by a # character. ie. specifying an empty value for a key implies that you want it to be written as such.

example: assume that you want to restore an action's runtime settings after possibly making changes:

' extract an action's initial runtime settings
Get Info:  Named Runtime Settings Set '\ai' as a key-value list in named variable 'initial runtime setting for action'
' ...
' remove all of the action's runtime settings
Remove all action runtime settings in the mapped set
' add back the initial settings
Set action runtime settings from key-value data "\<initial runtime setting for action>"

Regardless of the current execution mode, this statement is only executed once for any number of selected files.