Micro Focus QTP (UFT) Forums
SystemUtil Block Input method - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: SystemUtil Block Input method (/Thread-SystemUtil-Block-Input-method)



SystemUtil Block Input method - Surya - 03-27-2012

Does the 'SystemUtil.BlockInput' method only block the keyboard/mouse operations during execution or will it block the statements in the scripts which has SendKeys/DeviceReplay operations being called??

For Example:

my code is as below:
################################
Code:
SystemUtil.BlockInput
Browser().Page().WebButton().Click
Set WshShell = CreateObject("WScript.Shell")
Browser().Page().WebEdit().Click
WshShell.SendKeys "%f"
Browser().Page().WebButton().Click
################################

Will QTP enters the characters "%f" in the WebEdit even though BlockInput has been used?

Thanks in Advance!!
Surya


RE: SystemUtil Block Input method - ravi.gajul - 03-28-2012

Hi Surya,
systemutil.blockinput method Prevents keyboard and mouse input events from reaching applications.
You can use this method to prevent a run session being accidentally interrupted by someone using the keyboard or mouse on a QuickTest Professional computer.

After using this method, keyboard and mouse input is blocked until one of the following occurs:

An UnblockInput statement is used
A run session ends or is paused for any reason (end of test run, run error, breakpoint, and so forth)
The Ctrl+Alt+Delete key combination is pressed on the keyboard
A critical system error occurs
Hence the characters "%f" will not be sent



RE: SystemUtil Block Input method - Surya - 03-28-2012

Hi Ravi,

Thanks for providing the info. I tried myself this today on QTP and it worked as said.

Thanks,
Surya