Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Start and keystack do not work in batch file

Sep
1
0
Hi!

I want to start the email program "The Bat!" from within a btm batch file and send a keystack to minimize it.

In the options of The Bat! i set that Alt-F4 will not quit it but minimize it to the system tray.

So i wrote this line:

start /PGM "C:\Program Files (x86)\The Bat!\thebat.exe" & keystack /w54 Alt-F4

From a TCC or TCMD prompt this line works as expected, it loads the program and minimize it to the tray.
The same line in a btm batch file does not work: The program starts but it is not minimizing to the systray.

What's the error?

Thanks!
 
---- Original Message ----
From: Buddy
To: [email protected]
Sent: Wednesday, 2011. March 30. 13:01
Subject: [Support-t-2738] Start and keystack do not work in batch file

| Hi!
|
| I want to start the email program "The Bat!" from within a btm batch
| file and send a keystack to minimize it.
|
| In the options of The Bat! i set that Alt-F4 will not quit it but
| minimize it to the system tray.
|
| So i wrote this line:
|
| start /PGM "C:\Program Files (x86)\The Bat!\thebat.exe" & keystack
| /w54 Alt-F4
|
| From a TCC or TCMD prompt this line works as expected, it loads the
| program and minimize it to the tray.
| The same line in a btm batch file does not work: The program starts
| but it is not minimizing to the systray.
|
| What's the error?

KEYSTACK is not delivering keystrokes to the window you expect. Alternatives:
1/ use the /MIN option of START
2/ instead of a 3-s delay wait until the window of "The Bat!" is created:
do until iswindow "The Bat!"
delay /m 100
enddo
Once the window exists, use either
ACTIVATE "The Bat!" MIN
or
ACTIVATE "The Bat!" %+ KEYSTACK alt-F4
--
HTH, Steve
 

Similar threads

Back
Top