i tried to add the btc price with the python3 script of the touch or notch bar. inside the floating menu i added a standard item and my idea was to display the btc price inside a standard item. i made a shell script with python code of btc price , the code works fine when i run the script, after that i wasn't sure what to do , so i tried to add an apple script inside standard item that run the python script, but i think i got lost. im not a programmer
In general if you have the choice which programming language to use for things like this, go with Java Script - that's because it can be run directly in BetterTouchTool. (ChatGPT can often easily translate Python code to Java Script)
However if you'd like to keep it in Python you can do it like this (using "real javascript")
async function runSomePythonScript() {
let shellScript = '/opt/homebrew/bin/python3 /full/path/to/your/script.py';
let shellScriptWrapper = {
script: shellScript,
};
let result = await runShellScript(shellScriptWrapper);
return result;
}
Make sure to use the full path to python as well as to your script.