AddDialogProperty

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

AddDialogProperty

Post by Jerry Thomas » Tue Apr 28, 2015 11:27 pm

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.
Thanks,
Jerry

[email protected]

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: AddDialogProperty

Post by JRL » Wed Apr 29, 2015 1:31 pm

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...

Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Re: AddDialogProperty

Post by Jerry Thomas » Wed Apr 29, 2015 2:44 pm

That sounds reasonable
Thanks JRL!
Thanks,
Jerry

[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts