LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No menu on double-click with the right button

I could have sworn it generated a menu on double-click when I tested it on Friday but today it seems to be working.....

 

Hmm, maybe my 2011 Installation at home is not OK.

 

Shane.

0 Kudos
Message 11 of 27
(799 Views)

Strangely, in the tst's example I can't get the Stop Value change event to work.

Here is a slightly simpler vi completely time driven. I owe to tst the mouse simulation part, though, that I didn't have at hand.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019
Message 12 of 27
(785 Views)

Yes, both of these achieve what I was looking for. <BEER>

 

Wouldn't it be nice, however, if we could simply programatically activate the menu shortcut and bypass the whole mouse simulation part?  This would then be cross-platform also.

 

I personally feel a LOT more UI actions should be programatically available for activation, not just the menu shortcuts.

 

Shane.

0 Kudos
Message 13 of 27
(772 Views)

Well, NI has improved and added a few UI simulation methods to the Application class, but I agree that the list is still too short.


@pincpanter wrote:

Strangely, in the tst's example I can't get the Stop Value change event to work.


My example was simply a quick modification of the earlier example, so I didn't bother making it too clean or efficient. The reason the value change event doesn't work is that the logic to discard the event is faulty, so some valid events (like the left click) are discarded.


___________________
Try to take over the world!
0 Kudos
Message 14 of 27
(763 Views)

@tst wrote:

Well, NI has improved and added a few UI simulation methods to the Application class, but I agree that the list is still too short.

 


 

Intriguing.  I was unaware of this.  In which LV version?  Which functions?

 

Shane

0 Kudos
Message 15 of 27
(756 Views)

I don't have it in front of me, but I think that the only one which would be relevant here would be triggering a menu item, which I think was added around 2010-11. The rest are more related to IDE automation. The existing ones should be in the Application class, under UI.


___________________
Try to take over the world!
0 Kudos
Message 16 of 27
(743 Views)

tst ha scritto:

My example was simply a quick modification of the earlier example, so I didn't bother making it too clean or efficient. The reason the value change event doesn't work is that the logic to discard the event is faulty, so some valid events (like the left click) are discarded.


 OK, I didn't mean to criticize your work. My code needs optimization too.

 

Hey Shane, may I get a non-alcoholic virtual beer instead? Smiley Very Happy

Paolo
-------------------
LV 7.1, 2011, 2017, 2019
0 Kudos
Message 17 of 27
(734 Views)

> Wouldn't it be nice, however, if we could simply programatically activate the menu shortcut and bypass the whole mouse simulation part?  This would then be cross-platform also.

 

You can use a subVI the simulate a popup menu as I suggested before.

Beside, simulate a click with SendInput or kb_event is not robust method.  As it sends the click the active window, whichever it is.  No galuntee your front panel will get it.

 

George Zou
0 Kudos
Message 18 of 27
(727 Views)

@pincpanter wrote:

 

Hey Shane, may I get a non-alcoholic virtual beer instead? Smiley Very Happy


No.  The beer I offered was virtually alcohol free anyway.....

 

Here ya go.  <Water> Smiley Very Happy

 

 

0 Kudos
Message 19 of 27
(720 Views)

Using a sub-vi to simulate a menu is an avenue I'm not willing to investigate.

 

It's far too much work for something which is 99% available already.

 

Shane.

0 Kudos
Message 20 of 27
(718 Views)