Hello Guest it is April 19, 2024, 06:53:53 PM

Author Topic: Disabling "MyNotify()" ID calls, of "Disabled" Plugins.........  (Read 3477 times)

0 Members and 1 Guest are viewing this topic.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
I had noticed that if I had "Disabled" plugins in my plugin directory, that had Message ID functions listed under MyNotify(), that when I was using
my "Message Capture" plugin (in finished plugins). That those Plugin Mynotify functions WOULD REACT!!!!!

I have ALOT of plugins in my directory, I was testing the "NotifyPlugins(6000)" and a "Video Window" configuration opened., I have a Galil plugin that was
disabled, and I had tried 5000, well that launced one of the Galil notify functions......

So, I asked Art about it,  Here is the solution he gave me. I used it in the Capture Message Plugin, and the new MAD 3.7 (will get to my others later).

As a Global Variable Put:   bool PluginEnabled = false;

Art said, myPostInitControl() is only called if there is a Green Check for that plugin so...

void   myPostInitControl ()
{      
   PluginEnabled = true;

                 /// rest of your code.
}


Then in myNotify(int ID)

void   myNotify ( int ID)
{   
   if( !PluginEnabled) return;  //If false, it will jump out so any of your ID == # statements will not react

                 /// rest of your code.
}

scott
fun times

Offline smurph

*
  • *
  •  1,546 1,546
  • "That there... that's an RV."
    • View Profile
Re: Disabling "MyNotify()" ID calls, of "Disabled" Plugins.........
« Reply #1 on: June 17, 2009, 01:41:50 AM »
I'll get that in the Galil Plgin ASAP Scott.  Thanks for the information!

Steve

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Disabling "MyNotify()" ID calls, of "Disabled" Plugins.........
« Reply #2 on: June 17, 2009, 07:58:02 AM »
NP,

  THANK YOU, for all the fantastic Galil work you have done!!!

Scott
fun times