Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


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