I need to set AddDialogProperty to blank (turn off the action briefly).
I am changing the setting for a checkbox through code.
That change triggers the the checkbox OnClick action.
I want to do something like this...
AddDialogHandler>Dialog1,CheckBox1,OnClick,CheckBoxAction
...
<later in script>
...
AddDialogHandler>Dialog1,CheckBox1,OnClick, <blank>
<some code that changes the checkbox state)
AddDialogHandler>Dialog1,CheckBox1,OnClick,CheckBoxAction
Blank does not work (script starts over at the beginning and tries to run 2 iterations)
Currently I am just setting the action to an empty SRT for now. <<UPDATE THIS DOES NOT WORK
Setting the action to the dummy SRT works, but setting it back to original action does not.
AddDialogProperty
Moderators: JRL, Dorian (MJT support)
-
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA
Re: AddDialogProperty
Typically, I use a variable as a flag to control my subroutines. At the start of the script create a variable
Let>SubControlFlag=0
Make the first line of the dialog handler's subroutine.
If>SubControlFlag=0.
Then when you don't want the subroutine to run
Let>SubControlFlag=1
the subroutine is still called but the contents are not executed, effectively turning off the dialog handler.
Then when you want the subroutine to run again
Let>SubControlFlag=0
And so on...
Let>SubControlFlag=0
Make the first line of the dialog handler's subroutine.
If>SubControlFlag=0.
Then when you don't want the subroutine to run
Let>SubControlFlag=1
the subroutine is still called but the contents are not executed, effectively turning off the dialog handler.
Then when you want the subroutine to run again
Let>SubControlFlag=0
And so on...
-
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA