Machsupport Forum

Mach Discussion => Mach4 General Discussion => Mach4 Toolbox => Topic started by: idoma on February 26, 2024, 09:14:38 AM

Title: how to get wxMessageBox to disappear with an input?
Post by: idoma on February 26, 2024, 09:14:38 AM
hey guys
is there a way to close a wxMessageBox with an external input  (like input 0 for example?)
i use it as a warning message for the user when a safety door is open and i want it to go away once it's closed.
thanks!
Title: Re: how to get wxMessageBox to disappear with an input?
Post by: cncmagic on March 09, 2024, 10:00:47 PM
in the screen plc code read the state of the input and generate the message.. make sure you keep track and only do on a transition so it doesn't generate the message every scan.. and simply either lockup Mach4, crash or both.  :o
Title: Re: how to get wxMessageBox to disappear with an input?
Post by: cncmagic on March 09, 2024, 10:58:19 PM
my mistake.. not sufficient coffee this morning... no.. I don't see any method to close a message box using an input.. why don't you simply write into the bottom message banner when the guard is open.. you can clear that from the plc script.. or put a box on the screen and then make it invisible. Or you could do something really crazed and try to stuff keystrokes into the keyboard buffer to clear the box.. now that would be something to post!!!  :-\
Title: Re: how to get wxMessageBox to disappear with an input?
Post by: idoma on March 10, 2024, 05:35:00 AM
Hey. Thanks for taking the time to reply.
That's what I thought, but was hoping for someone to have a better idea...  :P

Title: Re: how to get wxMessageBox to disappear with an input?
Post by: cncmagic on March 10, 2024, 09:03:10 AM
and while this would be beyond my really truly meager capabilities.. I guess you could somehow retrieve the message box instance itself (or its thread or whatever id or position in the Ether it holds) and kill that in code.. way past anything I would attempt myself.  :o