Micro Focus QTP (UFT) Forums
Key Combination(ctrl+arrow+space) - 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: Key Combination(ctrl+arrow+space) (/Thread-Key-Combination-ctrl-arrow-space)



Key Combination(ctrl+arrow+space) - Mighty_River - 03-19-2008

How to send the following combination of keys using script as input:
CONTROL+DOWN ARROW+SPACE BAR?

I tried following code:

Code:
Set WshShell = CreateObject("WScript.Shell")
' Activate the browser window
WshShell.AppActivate "complexowl"
wait(3)
WshShell.SendKeys "^{DOWN}{[b]<SPACE>[/b]}"


But i am not sure what should i use to send SPACE BAR as input?

If possible also suggest me how can i do "Left Mouse Click" while CTRL key is kept pressed?

Thanks in advance,

Regards,
Sandeep


RE: Key Combination(ctrl+arrow+space) - yogendrasr - 05-16-2008

Hi Sandeep,

If you want to send keys using script, then I would suggest you to use the .Type ( key ) to send keyboard input:

Eg:
Code:
Window("Notepad").WinEditor("Edit").Type micF5


You can also use the use the SendKeys method that u are using.

For sending a Space as input, I think u need to use " " (Space between double quotes).

For eg in your case it is:

Code:
Window("Notepad").WinEditor("Edit").Type micCtrlDwn + " " + micDwn


Hope this works.

Also for ur second query:

Code:
Window("Notepad").WinEditor("Edit").Type micCtrlDwn + micLeftBtn


Also pls use the attached file for your reference.
Pls update me if you have found another way out or if I am wrong .

Thanks