Closed JoeC4281 closed 1 year ago
Hi,
Oh, seems like vscode doesn't recognize .BTM files :( I'll look into adding proper .BTM support for the extension.
In the meantime, a workaround would be to go into your User or Workspace Settings (JSON), And manually tell VSCode to treat .btm files as batch files by adding the following:
"files.associations": {
"*.btm": "bat"
}
Thank you for reporting this issue!
Cheers, Nils
Thankyou, that works for me.
Note well that TCC-RT would be free to distribute with your VSCode Extension, so that would (maybe) make things easier for integration into VSCode.
Note that TCC-RT is a 64-bit only application.
You can contact Rex Conn, owner of JPSoft, to confirm this, and let him know of your intentions, if you decide to go this route.
The JPSoft Forum is very active, and any questions you have about TCC-RT could be answered there.
Joe
That's not quite correct. While TCC may run .bat
files to a degree, it not always correctly replicate all CMD bugs/caveats.
Blindly replacing %ComSpec%
with TCC is not the right way for living a long and prosperous life.
A more direct approach could be to map extensions to configured terminals. Then it is up to user to configure terminals and sort extensions across them. F.e. I have configured terminals for
Cygwin Bash
(User)Git Bash
(User, not working due to a bug in 1.67+)PowerShell
v7 (User, manually installed)Windows PowerShell
(User, stock one, autodetected)Windows CMD
(User, autodetected)SSH to dev VM
(workspace local)Default terminal is different depending on project. Commonly it is Cygwin Bash, but not always.
CMD could run %PATHEXT%
scripts from associations, but in Win10+ (may be even Win8) it has a frightening bug of premature symlink resolution, which makes linked scripts useless outside their realpath.
Hi,
Thank you both for your valuable thoughts.
After thinking about this for a while, I've come to the conclusion that officially supporting .BTM files would be out of scope for what this extension sets out to do. Hence the 1.0.1 update has removed all indications that this extension would support .BTM files.
Support for .BTM files should probably be handled by another extension that could revolve more around integrating TCC in VS Code (and possible even bundle TCC-RT, as you mentioned).
Cheers, Nils
Hi, I would like to run a Take Command Console .BTM from VSCode.
I have made the following change; "batchrunner.cmdPath": "C:\Program Files\JPSoft\TCC_RT_28\tcc.exe"
Unfortunately, I have to rename my test.btm to test.bat in order for it to execute when I press F5.
When I press F5 to run test.bat (which is test.btm, renamed), the batch file is executed in the terminal below, and runs as it should, using tcc.exe instead of cmd.exe
If I press F5 with test.btm being the active document, I receive;
What do I have to change in VSCode so that I can run a Take Command Console .BTM from VSCode using your extension?
(Note that I am not an experienced VSCode user, and that I am still learning).
The runtime version of TCC, which I am using for running a .BTM from VSCode, can be obtained from https://jpsoft.com/downloads/v28/tcc-rt.exe
Thankyou for your assistance.
Joe