what does the error message say?
have you also tried using the InsertKeys method of the Keyboard object?
best
Roy.
----- Original Message ----- 
  From: David 
  To: Scripting List WE 
  Sent: Sunday, November 01, 2009 3:43 PM
  Subject: What's wrong here - please help


  Hi, 
  I am trying to write a script. The following code should press the 
keysequence 
      tll 
  for me, whenever the hotkey is pressed. But all that I get, is an error 
message for the line, which I have marked with (*). In other words, the (*) 
itself, does not apper in the code...

  dim MyHotkey1 : Set myHotkey1 = Keyboard.RegisterHotkey("Control--Shift-A", 
"NextItem")
  Set WshShell = WScript.CreateObject("WScript.Shell")
  sub NextItem()
  Speak "Next Item"
  (*)WShShell.SendKeys "tll"
  end sub 'NextItem


Reply via email to