Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using SendKey for a key-combination
#1
Not Solved
Who knows how to use the SendKey (or another) function to send a key-combination to a Terminal Emulator ?
I would like to send the combination [Alt]+[F1] to retrieve extra info on user-messages in our application.
Reply
#2
Not Solved
Hi,

You can use the below statements:

Code:
Dim WshellObj
Set WshellObj=WScript.CreateObject("WScript.Shell")
WshellObj.SendKeys "%+{F1}"

But make sure, whether QTP set context to the application before the these statements.

Regards,
Uday.
Reply
#3
Not Solved
Thanks, works great !

Was already experimenting with the Sendkeys-function but it didn't work ... because I didn't know about the "+" in the middle Smile

Rgds,
Paul

-------------------------------------------------------------------
Hi,

You can use the below statements:

Code:
Dim WshellObj
Set WshellObj=WScript.CreateObject("WScript.Shell")
WshellObj.SendKeys "%+{F1}"

But make sure, whether QTP set context to the application before the these statements.

Regards,
Uday.
Reply
#4
Not Solved
Hi Uday,

I've tried this code again (after leaving QTP aside for a while), and for some reason I get following error-message now on the line with the Set-command : " Object required: 'WScript' ".
Any idea ?


Rgds,
Paul
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to pass "Enter" Key through Sendkeys Lavanya N 1 4,168 07-24-2015, 02:17 PM
Last Post: Lavanya N
  QTP key issue fix kprasadbio 1 3,171 05-04-2013, 10:47 AM
Last Post: Saket
  Object Repository and Discriptive Programing combination raaj123 1 2,586 05-22-2012, 08:32 PM
Last Post: Ankesh
  "1062 - Duplicate entry '557132' for key 1" while trying to register to Mercury Tour karankaruna 4 6,014 03-17-2011, 04:37 PM
Last Post: kodak
  key word driven testing goka 0 3,129 02-18-2011, 01:36 AM
Last Post: goka

Forum Jump:


Users browsing this thread: 1 Guest(s)