Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 12:38:44 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  Disabling "MyNotify()" ID calls, of "Disabled" Plugins.........
Pages: 1   Go Down
Print
Author Topic: Disabling "MyNotify()" ID calls, of "Disabled" Plugins.........  (Read 814 times)
0 Members and 2 Guests are viewing this topic.
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 1,707


Briceville, TN, USA


View Profile WWW
« on: May 16, 2009, 11:04:01 AM »

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
Logged

Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
smurph
Active Member

Offline Offline

Posts: 244


View Profile
« Reply #1 on: June 17, 2009, 12:41:50 AM »

I'll get that in the Galil Plgin ASAP Scott.  Thanks for the information!

Steve
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 1,707


Briceville, TN, USA


View Profile WWW
« Reply #2 on: June 17, 2009, 06:58:02 AM »

NP,

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

Scott
Logged

Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!