SendKeys in Lotusscript? Are you the devil?


SendKeys. It ain't implemented in Lotusscript. But the command is there for you to gaze at in frustration. Well, give this a stab — it might help.

Again, as with the Landscape printing API code, I can't take credit for this. It's just some code I found on my internet trawls and tucked away. The Win32 API is used to provide a basic SendKeys implementation. Download the attached LSS file, and do with it what you will (I suggest creating a blank script library, and then doing a File / Import with the LSS file).

Testing etc.

An example call is provided in the code, and you can do some good stuff with it. In testing, the only issue I've noticed is apparent random case mixing, so I wouldn't suggest using this code to write a thesis in NotePad. But for sending commands to apps, it's the daddy.

Have fun!



  1. Wow - thank you Mr Poole for saving the day - this is a great script librarySP#
  2. I traced the case issue to the Case statement in the PushKeys sub. It was using Case "A" To "Z", … for the shifted uppercase letters, but it was executing this case statement for lower case letters too for some reason. When I changed the statement to Case "A","B","C", … it worked just fine.Matthew Fox#
  3. So what is the format for MULTIPLE key events: (ie: [CTRL-A], of ALT-F4) for instance?David Wuest#

Comments on this post are now closed.


I’m a software architect / developer / general IT wrangler specialising in web, mobile web and middleware using things like node.js, Java, C#, PHP, HTML5 and more.

Best described as a simpleton, but kindly. You can read more here.

File Attachment Icon