WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Sending Keystrokes

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Sending Keystrokes from one WBT to Another WBT

Keywords:     sendkey 2nd wbt second wbt

Here's a sample script to have one Wbt file close another's dialog box, or message box, by sending a keystroke to the original program.
;;one.wbt
Run("two.wbt", "")
Pause("test","Don't push anything, let the other wbt close me.")
display(3, "testing", "the other box is gone, worked")
And the second WBT file's contents are:
;;Two.wbt
delay(1)
If winexist("test")
     delay(4)
     sendkeysto("test", "{enter}")
endif

Article ID:   W13830
Filename:   Sending ENTER Key from one WBT to a Second WBT.txt
File Created: 1999:04:15:16:56:40
Last Updated: 1999:04:15:16:56:40