One of my scripting projects, has to send a sequence of Alt-Tabs. To best 
reproduce my problem, here is what you can try.

1. Use Script Framwork, and create a new script
2. When asked to choose a hotkey, try setting it to Alt-Up arrow (this doesn't 
affect my probelm, but just to let you try it).
3. After Framework ends, open the script in your editor, and go to the bottom 
of it, and make the last Sub read the following:

Sub ForwardTab(myKeyId)
 'This routine is called when the hotkey Alt-Down is pressed.
 If Keyboard.KeyDescriberActive Then
  Speak myStrings(myKeyId & "_Description")
 Else
  'Main routine functionality goes here
  Speak "Forward. "
  Keyboard.InsertKey VK_Tab, KmAlt
  Keyboard.InsertKey VK_Tab, KmAlt
 End If
End Sub


4. Save your work, and load it in WE.
5. Open three or four documents/windows on your system.
5. Place yourself in Document1, and press the hotkey (alt-down arrow).
6. The script is meant to send two Alt-Tab sequences, which would have put you 
into document3.

But, here is my problem. What happens, is that the script switches to 
document2, then immediately throws you back to Document1. Sitting in Document1, 
and manually pressing Alt-Tab twice, I will pass by document2, and be left in 
document3. Why won't it work with the script? Due to a timing issue? Or, is 
there any other stuff going on? Would I have been better off, not using the 
Framework script, to initially create my script. That is, does the Framework 
insert any instructions, that could have been omitted here, and that would 
affect the behavior?

Thanks alot, everyone!

--
I am using the free version of SPAMfighter.
We are a community of 7 million users fighting spam.
SPAMfighter has removed 1485 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

The Professional version does not have this message

Reply via email to