I have a Shortcut which calls this scriptable script but I can’t get any output back to the Shortcut.
var myTextInput = new Alert();
myTextInput.title = "CAGR:"
myTextInput.addTextField("Start")
myTextInput.addTextField("End")
myTextInput.addTextField("Years")
let inPut = await myTextInput.presentAlert();
Start = parseFloat(myTextInput.textFieldValue(0));
End = parseFloat(myTextInput.textFieldValue(1));
Years = parseFloat(myTextInput.textFieldValue(2));
a = ((Math.exp(Math.log(End/Start)/Years)) -1)*100;
Script.setShortcutOutput(a)
Safari.open("shortcuts://")