Micro Focus QTP (UFT) Forums
Key of Spacebar for Send keys 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Key of Spacebar for Send keys method??? (/Thread-Key-of-Spacebar-for-Send-keys-method)



Key of Spacebar for Send keys method??? - souvikghosh_diatm - 08-30-2011

Hii all...

Can any one tell me dat wat would be the key for spacebar For send keys method???Actually i need to Check a CheckBox on SmartGWT application which is being identified as an Image object. Here .Click is not a good solution, and "On" or "Off" will not work as its an Image object.

So I have decided to use Send Keys method after taking the focus on it. I already tried "{SPACE}","{SPACEBAR}", "{SPC}".....but nothing is working....

As this is a very simple qstion(i guess so) i hope dat i'll be getting help as soon as possible...

Any Better suggestion instead of using Send Keys method will also be very much appreciated....

Drop me a mail on:: souvikghosh.diatm@gmail.com

------------
Thanx.


RE: Key of Spacebar for Send keys method??? - sshukla12 - 08-30-2011

Try SendKeys.Send("{SPACE}");
or SendKeys.Send("{" "}");

Regards,
Sankalp


RE: Key of Spacebar for Send keys method??? - souvikghosh_diatm - 08-30-2011

Boss thanx for ur suggestion but i have already tried SPACE and now i hv tried both wat u hv written bt none of them working...its getting Wrong number of property or value error....


Can u plzz tell me d exact syntax....


-------------
Thanx.


RE: Key of Spacebar for Send keys method??? - supputuri - 08-31-2011

Hi,

Try this below code it should work, if not let me know.
Code:
Dim objDevRply
Set objDevRply = CreateObject("Mercury.Devicereplay")
objDevRply.PressKey 57



RE: Key of Spacebar for Send keys method??? - souvikghosh_diatm - 08-31-2011

Thanx for ur suggestion supputuri .....Ur method is working properly...


Bt I have already used Send Keys method....
And the syntax for that is obj.SendKeys " "

It also working good for my case....


Thanx for ur precious help.....


------------
Thanx.