LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

FakeKeystroke

can i send FakeKeystroke to another app. that didnt write in cvi ?
0 Kudos
Message 1 of 5
(4,006 Views)
You will have to use Window's messages via the Windows SDK to accomplish this AND you will have to know if the non-CVI developed application will handle the messages you send to it.

For more information about Windows Messaging you should reference the information found on the Microsoft Developer Network at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/messques_0ilv.asp

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 2 of 5
(4,006 Views)
Did anybody do this FakeKeystroke sending to other app. successfully? I can not open Jason's link about MSDN windows message, please post it if you have the copy!Smiley Very Happy
0 Kudos
Message 3 of 5
(3,754 Views)
sevenzhaofei,
 
You won't be able to send a keystroke to another window using this method. This method only sends a keystroke to the currently active window.
 
That's why Jason suggested using the windows API because you have more flexibility there. For using windows API in CVI, refer to the following knowledgebase. Then you need to research on MSDN to find the appropriate functions to use. You can probably start from here.
Regards,

Song Du
Systems Software
National Instruments R&D
0 Kudos
Message 4 of 5
(3,716 Views)

Thanks for your reply!

Certainly, I have used the user32.dll to active the other app(CVI developed). I'm trying to send key stroke by PostMessage....However, the other app. has no response although no error. I use CVI 8.0.

0 Kudos
Message 5 of 5
(3,704 Views)