Hello Guest it is April 27, 2024, 07:07:37 AM

Author Topic: how to get wxMessageBox to disappear with an input?  (Read 214 times)

0 Members and 1 Guest are viewing this topic.

how to get wxMessageBox to disappear with an input?
« 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!

Offline cncmagic

*
  •  63 63
  • what me worry? heck...it ain't my machine anyway
    • View Profile
Re: how to get wxMessageBox to disappear with an input?
« Reply #1 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
any semblance of information posted to anything remotely  close to accuracy is merely coincidence. Use at you own discretion.. or play the lottery.. same odds

Offline cncmagic

*
  •  63 63
  • what me worry? heck...it ain't my machine anyway
    • View Profile
Re: how to get wxMessageBox to disappear with an input?
« Reply #2 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!!!  :-\
any semblance of information posted to anything remotely  close to accuracy is merely coincidence. Use at you own discretion.. or play the lottery.. same odds
Re: how to get wxMessageBox to disappear with an input?
« Reply #3 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

Offline cncmagic

*
  •  63 63
  • what me worry? heck...it ain't my machine anyway
    • View Profile
Re: how to get wxMessageBox to disappear with an input?
« Reply #4 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
any semblance of information posted to anything remotely  close to accuracy is merely coincidence. Use at you own discretion.. or play the lottery.. same odds