Dialog checkbox state remembered between calls?

Is there is a good way of enabling checkboxes on a ‘Prompt for User input’ dialog action to remember their state ?

I notice that the 1|0 ⇄ 0|1 default specifiers can be built from two numeric variables flanking a pipe character (using a three-character string variable value like “0|1” or “0|1” doesn’t seem to be read as a checkbox spec.

I suppose it might be possible to update the two numeric variables at the end of a macro, to reflect the current state of the checkbox’s resulting string variable state, but this begins to feel as if it may be drifting into Heath Robinson territory :- )

Might there be something simpler that hasn’t occurred to me ?

This works for me:
Enter this as default value: |%CkBoxVarName%|0|1

You do need to have an IF test up front to initialize CkBoxVarName if it does not exist.

It just occurred to me that maybe you are dynamically building the default value for the prompt. I had trouble with that, until I used this:


The key is having the first vertical bar.

1 Like

Perfect. Many thanks

The vertical bar is only needed at the front if you need to have multiple separated items within a single variable expanded to multiple items in the list, which is not the case here.

Just use:


The first time you run it, it will be a popup menu - select 0 or 1 and to set the initial value of CkBoxVarName and after that it will be a checkbox.

This is because:

0|0|1 is a checkbox defaulting to 0 (same as 0|1)


1|0|1 is a checkbox defaulting to 1 (same as 1|0)