Wednesday, April 28, 2010

Invoking Escape key using Lotusscript

There was one scenario that pushed me to explore for options through which I can control the keyboard using lotusscript. My thought was to invoke the Escape key using lotusscript.
Though this did not resolve my issue, still it was a new discovery on my path.

Put the following code on a button in a form, compose the same and click it.

Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.SendKeys ("{ESC}")

You will see the current form getting closed. Yes this code actually simulates the Escape key press on the keyboard.Again I believe that this will only work in windows

Hope this helps :)

No comments:

Post a Comment