1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Start and keystack do not work in batch file

Discussion in 'Support' started by Buddy, Mar 30, 2011.

  1. Buddy

    Joined:
    Sep 3, 2008
    Messages:
    1
    Likes Received:
    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!
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    ---- Original Message ----
    From: Buddy
    To: ESFabian@zenge.org
    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
     

Share This Page