07-25-2008 10:13 AM
07-25-2008 10:34 AM
Why don't you put your code in a sub vi. So you can call it from everywhere.
I don't know a way to trigger that event.
07-25-2008 10:50 AM
Hi, Doug,
I don't thisnk that this possible easily. Of course, you can simulate key presses, but this is not good way.
What you can do is — you can build simple state machine, where you will handle menu items, and this state machine can be also controlled externally, so you will call the same code from different places. For me such design pattern useful when I need to handle the same events from menu and from "toolbar". Or simple use SubVIs as mentioned above.
best regards,
Andrey.
07-26-2008 05:28 AM - edited 07-26-2008 05:30 AM
Yes, it makes sense and Yes, it is possible:
@DougFerguson wrote:
I am using an event structure to capture events from my custom run-time menu. However I would like to call the same code from one of those custom menu items progamically. Is there a way to dynamically fire a menu click so that the event structure will see it as an user event?
Does this make sense enough?
07-26-2008 04:11 PM - edited 07-26-2008 04:12 PM
07-29-2008 09:09 AM
07-30-2008 10:49 AM
07-30-2008 01:32 PM
07-30-2008 01:47 PM
07-31-2008 12:17 AM
Pass all the references to global variables. One of a few times, i use globals.
So you can use them from everywhere