Can't create a 2nd TP in a windows batch file.

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
chatt
Posts: 23
Joined: Thu Aug 28, 2003 6:53 pm
Location: near Toronto
Contact:

Can't create a 2nd TP in a windows batch file.

Post by chatt »

I want to start 8 Textpads with 8 particular workspaces.
If they're in a batch file (under win2K) as follows,

Code: Select all

    CALL textpad -m E:\javaPackages\xag\command\Cmd.tws
    CALL textpad -m E:\javaPackages\xag\component\Component.tws
it runs the first one okay, but doesn't exit.

Thanks,
Peter
User avatar
CyberSlug
Posts: 120
Joined: Sat Oct 04, 2003 3:41 am

Post by CyberSlug »

The batch file will only move to the next call when the previous one has finished. By deafult, the call is not "finished" until its instance of TextPad is both launched and closed.

The fix is to preced the commands with cmd /c start ""

Code: Select all

@echo off
cmd /c start "" textpad -m "E:\javaPackages\xag\command\Cmd.tws"
cmd /c start "" textpad -m "E:\javaPackages\xag\component\Component.tws"
exit
chatt
Posts: 23
Joined: Thu Aug 28, 2003 6:53 pm
Location: near Toronto
Contact:

Post by chatt »

Thanks a lot CyberSlug, that works fine.

I guess windows distinguishes between CALLing batch files
and running .EXEs.

Thanks again.
Peter.
Post Reply