WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: Garry on May 17, 2024, 02:03:27 PM

Title: problem with procoptions event
Post by: Garry on May 17, 2024, 02:03:27 PM
I'm having a problem with a procoption using an event callback for radiobuttons.

It works fine but interferes with other routines that update the text in the same boxes the radiobuttons set.

I need to turn off the Radiobutton  procoption temporarily during other routines but I can't find out how to do that.

I attached some code that shows the basic code involved.

Anyone know how to turn off a procoption temporarily during other routines?
Title: Re: problem with procoptions event
Post by: td on May 18, 2024, 09:50:32 AM
The line " DialogProcOptions(dlghandle,MSG_RADIOBUTTON, 250) ;;;SET TIMER FOR RADIO BUTTON EVENT 250 msec"
is not setting a timer. It is simply turning on the RadioButton event. Any positive value turns on the event while a 0 value turns the event off.

Based on the script provided there is no indication that you are setting a timer or handling a timer event in your script.
Title: Re: problem with procoptions event
Post by: Garry on May 18, 2024, 11:17:18 AM
That was just an old rem from when I tried a timer event previously.

The code is what it is, not the remark. I'm still working on it and there's still messy bits left around.

I don't know how to disable it. It works ok but interferes in some places so I need to disable it during some routines.

How do I temporarily disable it?

I need an example of how to enable and disable it.
Title: Re: problem with procoptions event
Post by: Garry on May 18, 2024, 11:21:22 AM
 I just realized what you were stating.

I tried this and it disables it:

DialogProcOptions(dlghandle,MSG_RADIOBUTTON, 0)

Thanks for the help.