TYL PROGRAMMING LANGUAGE
▶ CREATING EXECUTABLE PROGRAMS
In build & run page we created a program 'songplayer.standalone.tyl', that we'll refer to it as the stand alone songplayer application, program or module. The application has all the code it needs for execution in one file, so we can put this file (along with the required dll files, found in Tyl installation directory), anywhere and click it, and it will be run by Tyl System.

In order to create an executable program, the program has to pass build stage, meaning we have to build it or run it successfully. Then we have to decide in which mode it needs to be run. The create executeable and execution modes buttons are described in application management buttons table in Tyl Launcher page. The form/background app button is used to select between foreground and background modes, while the fast button sets the mode to fast application. Once the mode selected, clicking create executable, will cause the system to create an executable file with the same name as the application name and the .exe extension.

So make sure to turn on the form/background app button, and create executable. You can see that file 'songplayer.standalone.exe' was created. Clicking on the executable file will run the program in Tyl Runner, that is Tyl user interface for executable programs, and will be referred to as runner. So now there are two open Tyl windows: launcher and runner.




Back in launcher, click on fast button. You can see that form/background app button went off. Now click create executable. If you check the executable program in File Explorer, you'll see that its modification date has not changed, meaning, the creation failed. The reason is that because the executable program is in use, the system blocks executable program creation. So close runner, and create executable now, and it will be created successfully.

This time the system created a fast application, meaning it will run in the background and be fast. Clicking it will beep a sound, and the print statement will not be executed. In the code there is no system interactivity, so there are no any differences between background and fast activities, but when running, fast will run faster. In order to compare between them you can create a program 'soundplayer.standalone.background.tyl', turn off form/background app and fast buttons , create executable, and run it.
Attention: creating an executable program overwrites an existing executable program with the same name without notice, so if both programs need to be created in the same directory, save the existing program in a backup directory!