JimboH Posted March 19, 2012 Report Share Posted March 19, 2012 Hi all, There had been a library floating around for a while called SendKey.llb. Does anyone have a copy of it that I could use in LV 2009? I am trying to get a handle to an open window and send some keys to it. Thanks, Jim Quote Link to comment
asbo Posted March 19, 2012 Report Share Posted March 19, 2012 Have you tried this? Simulating Keyboard Input to Generate an Event Programmatically Quote Link to comment
JimboH Posted March 19, 2012 Author Report Share Posted March 19, 2012 I hadn't seen that vi, although there is this one as well http://zone.ni.com/devzone/cda/epd/p/id/3711 Neither vi demonstrates windows selection. I have an API which doesn't expose passing in a particular value to a program. Instead their code does allow a prompt in which you can type the value. To do this you need to first get the handle to the window, which is what that library helped with. I've found a couple of forum posts on the library, but the links are dead. Quote Link to comment
Saverio Posted March 19, 2012 Report Share Posted March 19, 2012 For the windows selection you might be thinking of this: Windows API Function Utilities (32-bit) for LabVIEW Quote Link to comment
JimboH Posted March 19, 2012 Author Report Share Posted March 19, 2012 Thanks for the reply. I have those vis as well. As perhaps the first comment on that page indicates, what I am looking for is lacking in that set of libraries. I was really hoping someone might have the files in their local collection ... Quote Link to comment
asbo Posted March 19, 2012 Report Share Posted March 19, 2012 I found a couple posts on NI's forums that linked to a SendKey.llb attachment, but none of them worked (404'd). I reported the posts to the moderator. To find a window, you can use the FindWindow() Windows API call. To set focus to a window, you can use the SetForegroundWindow() API call. Neither are very difficult to implement in a CLN. If the VI you're looking to target is a VI front panel that you can open a reference to, you can use the NativeWindow property: Quote Link to comment
JimboH Posted March 19, 2012 Author Report Share Posted March 19, 2012 Thanks. I figured it out. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.