Crosscap User Manual
Counter
CROSSCAP Manual > Project settings > Counter

Counter is a programmable software counter intended for special applications, such as counting with arbitrary increments (i.e. not just +1) or counting in reverse. Any number of Counters may be created. The Counter's current value can be polled from within a batch by using the corresponding Software counter variable. 

Counting up or down is triggered by a Count event (e.g. a new page or document). Two separate Count events may be specified, either of which will increment or decrement the counter. Index filters may be applied, which will further narrow down Count events.

(Re-)Setting a counter to some desired value is triggered by a Reset event (e.g. the beginning of a new document or the occurence of a color page). Two separate Reset events may be specified, either of which will (re-)set the counter. Index filters may be applied, which will further narrow down Reset events.

 

Clicking the icon for the extended menu  will open up the Counter configuration menu. Any number of Counters may be created, CROSSCAP will appropriately number them, on first save.

 

Creating and deleting counters

By operating the green right arrow button, you may add a new counter from the left column (Available:) to the right column (Selected:). If a counter is highlighted in the right column (Selected), operating the green left arrow button will return it to the left column (effectively deleting it).

 

Configuring counters

Highlighting one of the counters in the right column will select it for editing and update the Properties of ... window, accordingly:

 

Default 

Start value

Counter initializes to this value, after every batch start. The counter will assume this value as soon as the first count event has occured (start value may be zero or any positive or negative integer value).

 

Increment

Defines the increment used for counting (increment may be any positive or negative integer value).

 

First count event

Choose from one of the following:

 

Index filter

This index filter is associated with the first count event. It may be used to further narrow down count events by comparing them to index values. Count events not matching filter conditions (Result = FALSE) will be ignored:

The default filter criterion is an asterisk

*

which effectively filters nothing at all, all incoming count events are valid.

If the filter string begins with a caret character

^

then the following string of characters will be interpreted as a Regular expression, which allows for flexible filtering. For more and detailed information please refer to the section on Regular expressions, in the appendix.

 

Second count event

Choose from one of the following:

 

Index filter

This index filter is associated with the second count event. It may be used to further narrow down count events by comparing them to index values. Count events not matching filter conditions (Result = FALSE) will be ignored:

The default filter criterion is an asterisk

*

which effectively filters nothing at all, all incoming count events are valid.

If the filter string begins with a caret character

^

then the following string of characters will be interpreted as a Regular expression. For more and detailed information please refer to the section on Regular expressions, in the appendix.

 

Reset value

Counter is set to this value, after a reset event (reset value may be zero or any positive or negative integer value).

 

First reset event

Choose from one of the following:

 

Index filter

This index filter is associated with the first reset event. It may be used to further narrow down reset events by comparing them to index values. Reset events not matching filter conditions (Result = FALSE) will be ignored:

The default filter criterion is an asterisk

*

which effectively filters nothing at all, all incoming reset events are valid.

If the filter string begins with a caret character

^

then the following string of characters will be interpreted as a Regular expression, which allows for flexible filtering. For more and detailed information please refer to the section on Regular expressions, in the appendix.

 

Second reset event

Choose from one of the following:

 

Index filter

This index filter is associated with the second reset event. It may be used to further narrow down reset events by comparing them to index values. Reset events not matching filter conditions (Result = FALSE) will be ignored:

The default filter criterion is an asterisk

*

which effectively filters nothing at all, all incoming reset events are valid.

If the filter string begins with a caret character

^

then the following string of characters will be interpreted as a Regular expression, which allows for flexible filtering. For more and detailed information please refer to the section on Regular expressions, in the appendix.

 

Output

Name

You may give this Counter a unique name, which will make it easier to distinguish from any other counters created. If no custom name is assigned, CROSSCAP will automatically enumerate Counters.