Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Key Combination(ctrl+arrow+space)
#1
Solved: 11 Years, 4 Months, 1 Week ago
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
Reply
#2
Solved: 11 Years, 4 Months, 1 Week ago
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


Attached Files
.doc   Using Keyboard.doc (Size: 58 KB / Downloads: 645)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to pass "Enter" Key through Sendkeys Lavanya N 1 4,171 07-24-2015, 02:17 PM
Last Post: Lavanya N
  how to use keyboard "Space' using qtp Naresh 2 3,125 06-11-2015, 06:30 PM
Last Post: venkatesh9032
  QTP key issue fix kprasadbio 1 3,172 05-04-2013, 10:47 AM
Last Post: Saket
  Keyboard Shortcuts "Ctrl+s" are not working in QTP11 dipti 0 3,042 12-31-2012, 05:08 PM
Last Post: dipti
  How to remove space between webelements silpavinod 2 3,279 10-11-2012, 02:53 PM
Last Post: silpavinod

Forum Jump:


Users browsing this thread: 1 Guest(s)