Computer Science Canada

Running .t Files Directly in the Run Window

Author:  scholarlytutor [ Fri Jun 26, 2020 2:51 pm ]
Post subject:  Running .t Files Directly in the Run Window

What is it you are trying to achieve?

I was wondering if, rather than having to create an executable file, it is possible to have a turing.t file open directly to the run window rather than showing the code.


What is the problem you are having?

Turing executable files are not very efficient - they really work the CPU. When I send programs to other people (such as my students), if they could open my .t files and have it directly go to the run window (without seeing the code so that they don't accidentally change it), that would solve this issue.


Describe what you have tried to solve this problem

I was wondering if something like a batch file would solve the issue. I've also considered whether some type of command can be used in my code to tell Turing to close the editor window. Finally, I've looked in the Preferences section of Turing.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

This applies to any Turing program.

Please specify what version of Turing you are using

I use Open Turing.

Author:  Dan [ Tue Jul 14, 2020 8:40 pm ]
Post subject:  Re: Running .t Files Directly in the Run Window

I don't know about Open Turing but the old HoltSoft version of Turing could do this but it was not documented and a bit of a hack. We had to use this for the DWITE judge.

The batch script we used (called summon_cthulhu.bat) is as follows:

code:

@ECHO OFF
ECHO #execdir %CD% > "%CD%/_index.txt"
ECHO B %~1 >> "%CD%/_index.txt"
turing.exe -testsuite "%CD%"


If I remember correctly, this puts Turing in a test mode that runs the file listed in _index.txt (the above batch script creates this file and runs Turing in test mode).

This is talked a bit about a bit more in this post: http://compsci.ca/v3/viewtopic.php?t=30105


: