Page 1 of 1

External tool must be run TWICE to run a compiled program

Posted: Fri Oct 08, 2010 2:57 pm
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

Posted: Sat Jun 11, 2011 2:09 am
by 357mag
I have noticed the exact same thing when I ran my program. Is there a fix in the works?

Posted: Sat Jun 25, 2011 1:27 am
by 357mag
Forum is deceased.

External tool must be run TWICE to run a compiled program

Posted: Sat Jun 25, 2011 2:44 am
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++.