Jump to content


Photo
- - - - -

SendKey.llb

win32

  • Please log in to reply
6 replies to this topic

#1 JimboH

JimboH

    Active

  • Members
  • Pip
  • 16 posts

Posted 19 March 2012 - 01:41 PM

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

#2 asbo

asbo

    I have no idea what you're talking about... so:

  • V I Engineering, Inc.
  • 1,273 posts
  • Version:LabVIEW 2011
  • Since:2008

Posted 19 March 2012 - 01:57 PM

Have you tried this? Simulating Keyboard Input to Generate an Event Programmatically

#3 JimboH

JimboH

    Active

  • Members
  • Pip
  • 16 posts

Posted 19 March 2012 - 02:40 PM

I hadn't seen that vi, although there is this one as well http://zone.ni.com/d...a/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.

#4 Saverio

Saverio

    Enough LAVA to be dangerous

  • Members
  • PipPipPip
  • 144 posts
  • Version:LabVIEW 8.2
  • Since:1994

Posted 19 March 2012 - 02:46 PM

For the windows selection you might be thinking of this: Windows API Function Utilities (32-bit) for LabVIEW

#5 JimboH

JimboH

    Active

  • Members
  • Pip
  • 16 posts

Posted 19 March 2012 - 03:01 PM

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 ...

#6 asbo

asbo

    I have no idea what you're talking about... so:

  • V I Engineering, Inc.
  • 1,273 posts
  • Version:LabVIEW 2011
  • Since:2008

Posted 19 March 2012 - 03:11 PM

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:

OSWindow,NativeWindow.png

#7 JimboH

JimboH

    Active

  • Members
  • Pip
  • 16 posts

Posted 19 March 2012 - 03:49 PM

Thanks. I figured it out.