LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Pop up message as a trigger

I want to write a Labview program to detect a windows pop up message from another app and at the detection of the message cause a conveyor which is connected to the PC to stop. I'm using a DT9817R Data Translation I/O Device as the link between the conveyor and the PC.

Does anyone know how I can capture the windows message?

0 Kudos
Message 1 of 8
(3,089 Views)

First off I do not think you can do that.

 

There just is no way to absolutely determine if a popup is on the screen and what it says.

What if it pops up under another window? 

 

You should just abandon that idea from the start and figure out how to use the hardware you have to do this properly. 

 

From your short description it sounds like you want to stop the conveyor when it reaches a certain point?

 

This would be better accomplished by using your hardware to read position sensors or limit switches on the conveyor and LabVIEW to make logic decisions based on sensor input.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 8
(3,065 Views)

Several years ago, a clever student showed me something called "AutoIT", a scripting language that could detect and "send messages" when Windows events (such as a Popup Message) appears.  He also managed to connect this with LabVIEW, and was able to use a small LabVIEW Program running in the background and talking to AutoIT to [I don't remember exactly what he wanted to do, but, needless to say, he got this to work].

 

Bob Schor

Message 3 of 8
(3,063 Views)

Thanks @RTSLVU. I know I can use the I/O device to do this, but it will be writing a new program and asking the users to abandon the existing application. The goal is to continue to use the existing application while adding some extras that can work in conjunction with it.

0 Kudos
Message 4 of 8
(3,059 Views)

Thanks @Bob, I will check out the AutoIT.

0 Kudos
Message 5 of 8
(3,058 Views)

@TheNovis wrote:

Thanks @RTSLVU. I know I can use the I/O device to do this, but it will be writing a new program and asking the users to abandon the existing application. The goal is to continue to use the existing application while adding some extras that can work in conjunction with it.


Maybe you should reconsider that goal and just do it right. 

 

I get it coming from a production environment, I understand production management never wants to change anything if  "what we're now doing now, works." But eventually all those band-aids on top of band-aids begins to unravel and you are left with a huge mess and zero time to fix it/.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 8
(3,040 Views)

wiebe@CARYA wrote:

You can probably also do that with the .NET reflection classDefinetelly possible.


Hmm that got posted before I edited the text. The link should still work, but reflection doesn't apply to the link. Reflection can still do that IIRC.

 

Also not too sure if it will actually detect a window, or just the process.

0 Kudos
Message 8 of 8
(3,013 Views)