LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How generate some event

Hi All!
Please, advise me how I can generate some event manually? I mean LV predefined events, "Mouse down", "Menu selection", "Panel Close",  for example.

THX!
0 Kudos
Message 1 of 6
(3,477 Views)

Currently, the only event which can be generated programmatically is the Value Change event. You can generate by using the Value (signaling) property of the control which the event is registered to. You can register your own event (called user-defined events) and fire those programmatically. Read the LV documentation for more information on that.

This is not available in LV 6.1.


___________________
Try to take over the world!
Message 2 of 6
(3,471 Views)

Hi OlegUA, (and respectful greetings, tst,)

      Are you (OlegUA) specifically interested in User Interface mouse events?  If you are in a Windows environment, then (I'm _almost_ certain) it is possible to generate mouse events, in LabVIEW, through calls to Windows API - such as user32.dll.  To find the right DLL and function, just google ("windows API" YourMouseEvent).  The Call Library Function lets you interface with these DLLs.  If you're new to Call Library Function, save your work frequently as you're learning.  I should point-out that such calls to the Win API makes your code less portable.
 
      If you don't mean just mouse events...
In LabVIEW 7.1 (7.0?)  you can build your own events with "Create User Event" and invoke them with "Generate User Event".  I don't know an easy way to the Events palette!  I just noticed it after opening an "Events Structure", right-clicking on border and selecting "Show Dynamic Event Terminals", then right-click on the terminal and select "Events Palette".  Note:  If someone will kindly help me to a nearer door, a "Samuel Smith's" NBA awaits you at my humble hovel.
 
cheers
 
When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 3 of 6
(3,448 Views)

Yes, you can very easily move the mouse and simulate clicks using functions from user32.dll and I've even posted such examples several times, but moving the mouse to a specific point on the screen and "clicking" it is not a good way to do things. The full documentation for the windows API can be found in the MS developer network (MSDN).

User events are available in 7.0.

The events palette can be found inside the Application Control palette. If you want to find something inside the functions palette, click the search button which appears on the top of the functions palette (at least if you use the right view [that's the advanced view]).


___________________
Try to take over the world!
0 Kudos
Message 4 of 6
(3,443 Views)


@tst wrote:

...but moving the mouse to a specific point on the screen and "clicking" it is not a good way to do things.


Yes, but perhaps he has a PCI bus-analyzer for which there is no SDK, a solution is due in a week and all he has to do to is click mouse down over the "RUN" button in the GUI that came with the device - or something like that.Smiley Wink

Excellent - thank you for the directions, tst.  A "Nut Brown Ale" is waiting for you in Southern California.

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 5 of 6
(3,436 Views)

Obviously, there are good reasons for everything. For example, I used these features to create a "remote control" VI (it was relevant for a PDA where you can't use remote FPs). I just pointed out that this isn't a good way and that other options should be taken if available.

And I think I'll have to skip the ale, but thanks.


___________________
Try to take over the world!
0 Kudos
Message 6 of 6
(3,431 Views)