How to correctly use a terminal command to calculate the position for a floating menu?

I am trying to create a custom floating menu in BTT, and for the position setting, I selected "Position Retrieved From Dynamic Variable or Named Trigger". Then, I created a separate named trigger, e.g., called get_position_test.

The get_position_test trigger runs a script via the "Execute Shell Script / Task: -" module. This script calculates the desired coordinates and outputs them in the format {x, y}. However, BTT crashes immediately when I try this.

To debug, I simplified the script to a basic command:

echo "{100,100}"

But BTT still crashes instantly.

I then tried using the "Execute Terminal Command (Synchronous, blocking)" module to run the same echo "{100,100}" command, and BTT still crashes.

Finally, I used the "Run Real JavaScript" module with the following code:

async function someJavaScriptFunction() {
    return `{100, 100}`;
}

This worked as expected, and the floating menu appeared correctly.

So, I am wondering if I made a mistake somewhere or if this is a bug. Thank you!

I’ll have a look!

Best stick to javascript for now. You can use the runShellScript function from JS:
https://docs.folivora.ai/docs/1106_java_script.html#3-running-shell-scripts

The dynamic variable based positioning is a pretty obscure feature that I have only tried in some specific settings so far.

Thank you. This is my current solution, and it does work, but it doesn't seem very straightforward as it wraps several layers of commands. So, I wanted to ask if this might be a bug. I'm glad you're willing to take the time to check.