Andrew wrote:IWhat I still could not figure out is a way to start executing _bas files. So any help from the community will be much appreciated with this !
(if i stuff a "load xxx_bas" into the keyboard queue, the queue will still be consumed by my program and not by Job 0 Basic)
The trick here, in principal, is to first select the right Keyboard Queue (that would normally happen by manually pressing CTRL-C until the right CON window/queue is selected), before then issuing TYPE_IN or its equivalent.
There is a Turbo TK command to achieve this, assuming that you know the Chan ID of the target CON window (easy in our case, as this is typically '0' for Job-0's CON window #0). The command is COMMAND_LINE and, from Turbo TK v3.34 onwards, can actually take either a Job ID (it'll search for the first CON chan for that Job) or Chan ID.
The following sequence should therefore work:
(or QUEUE% from DIYTK)
It'll be necessary to ensure that Job-0 is actually waiting to receive input on Chan #0 prior to issuing COMMAND_LINE - so at the very least, the compiled job would need to be started with EXEC/EX rather than EXEC_W/EW.