BTW in the logs I cannot see anything related to the script when running it from "BTT configuration" window. Here the logs upon pressing the "Run Script":
2025/10/29 16:30:23:598|ASL|not on main|
2025/10/29 16:30:23:600|ASL|not on main|
2025/10/29 16:30:23:600|ASL|not on main|
2025/10/29 16:30:24:605|ASL|tracks are equal??|
2025/10/29 16:30:26:133|ASL|not on main|
2025/10/29 16:30:26:162|ASL|not on main|
2025/10/29 16:30:26:162|ASL|not on main|
2025/10/29 16:30:26:162|ASL|not on main|
2025/10/29 16:30:26:187|ASL|not on main|
2025/10/29 16:30:26:189|ASL|not on main|
2025/10/29 16:30:26:189|ASL|not on main|
2025/10/29 16:30:26:189|ASL|not on main|
2025/10/29 16:30:26:714|ASL|tracks are equal??|
Actually looking at your error, it is not the value that is undefined but the internal BTT object.
The weird thing is that it seems to be not undefined at the beginning of the script, otherwise it would already fail at the get_string_variable. Only after the runShellScript it seems to have gotten reset.
Could you check again with v5.739?
If that doesn't help, could you add these two logs:
Before runShellScript:
console.log("BTT", typeof BTT);
After runShellScript:
console.log("BTT2", typeof BTT);