From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-27-2019 11:38 AM - edited 05-27-2019 11:49 AM
I currently have a labview applications that sends commands to a third party application, so I can control it through labview. The problem I am having, is that I need to send a key combination (ctrl+shift+r), but I am unable to do this through labview.
I found a post that has a discussion about how to do this, but I can't get their code to work, based on my needs.
This is the website I found, that has this code.
https://forums.ni.com/t5/LabVIEW/programmatic-keyboard-events/td-p/887997?profile.language=es
05-27-2019 12:00 PM
Maybe you should give your 3rd party the keyboard focus?
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019N3tSAE&l=en-CA
05-27-2019 12:05 PM - edited 05-27-2019 12:06 PM
I am already doing that, beore sending the keyboard commands.
please see the picture, to see the code that I am using.
Thanks for responding.
05-27-2019 02:53 PM
Oh yeah I see of course.
Did you try adding a 100 ms delay after you setforegroundwindow ? Then press/hold CTRL+SHIFT+R.
05-27-2019 11:13 PM - edited 05-27-2019 11:14 PM
If the three key presses are being sent simultaneously, there's no guarantee you're sending CTRL + SHIFT + R. Modifier keys generally have to be pressed before pressing the letter. Instead try sequencing the CTRL, SHIFT and R key presses (in that order). You might also try setting the two modifier keys first (CTRL + SHIFT), wait maybe 50ms, then send the R key.
06-24-2019 04:51 AM
Be careful of the key order when pressed the combine key(CTRL+SHIFT+R).
06-24-2019 05:26 AM
Not sure how that subVI works (probably SendKeys functions). If you'd use SendMessage, you can send a WM_KEYDOWN and WM_KEYUP (maybe WM_SYSKEYDOWN\UP) messages. Benefit would be that the application doesn't need to have focus.
06-25-2019 07:35 PM
I agreed is better used the windows API function; If pressed combine keypad,maybe you can refer the attchment.