Monday 27 May 2013

QTP Script:turn On and turn Off Capslock using SendKeys

Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{CAPSLOCK}"
Msgbox"CapsLock is ON"
WshShell.SendKeys "{CAPSLOCK}"
Msgbox"CapsLock is OFF"
Similarly we can turn On/Off NumLock and ScrollLock also.
WshShell.SendKeys "{NUMLOCK}"
WshShell.SendKeys "{SCROLLLOCK}"

No comments:

Post a Comment