External tool must be run TWICE to run a compiled program

General questions about using TextPad

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

Post Reply
mwatso
Posts: 2
Joined: Fri Oct 08, 2010 2:36 pm

External tool must be run TWICE to run a compiled program

Post by mwatso »

Greetings,

I set up an "external tool" in textpad 5.3.1 to compile assembly language programs which works just fine. However, when I set up another external tool to run the program after it's compiled, I find that I must run the external tool TWICE in order to get the program to run. The first time, all I get is "Press any key to continue . . ."

On searching the forums, I find that this problem has been reported at least twice before, with both Borland C++ and an unspecified version of C, but I haven't seen any solutions posted. I'm hoping someone has figured this out and can advise me as to what I might be doing wrong.

For what it's worth, I notice that each time I issue a "tools->External tools->Run MASM program", a batch file is created in my working directory. The first time I issue the run command, the batch file looks like this:
@ECHO OFF
C:
CD \Users\username\MASM\helloworld

PAUSE

The second time (the one that actually runs my program) looks like this:
@ECHO OFF
C:
CD \Users\username\MASM\helloworld
helloworld
PAUSE

It seems to me that Textpad is failing to insert the $BaseDir into the batch file that it creates...but I can't figure out why, or what to do about it. My setup for the "run" external tool specifies a parameter of $BaseName, an initial folder of $FileDir, and leaves "capture output" un-checked. Any suggestions?

Michael Watson
357mag
Posts: 11
Joined: Fri Mar 25, 2005 6:24 am

Post by 357mag »

I have noticed the exact same thing when I ran my program. Is there a fix in the works?
357mag
Posts: 11
Joined: Fri Mar 25, 2005 6:24 am

Post by 357mag »

Forum is deceased.
mwatso
Posts: 2
Joined: Fri Oct 08, 2010 2:36 pm

External tool must be run TWICE to run a compiled program

Post by mwatso »

I have never found an answer to this problem. A pity, I really like TextPad, but it's become enough of an annoyance that I've migrated over to Notepad++.
Post Reply