Replies: 2 comments 1 reply
-
Thanks for this input. I have an alternative idea though, which would achieve the same thing: In the next version (2.26.0) I'm introducing a new Scripting function So in your shortcut's "Run on Failure" text body, on the Scripting screen, you could have code that looks like this (assuming you have a static variable named "myPassword" which stores the password): if (response && response.statusCode == 401) { // you might need to adapt this check, depending on what "failure" means in your case
const oldPassword = getVariable('myPassword');
const newPassword = promptPassword('Please enter your password', oldPassword);
setVariable('myPassword', newPassword);
enqueueShortcut(''); // this will re-run the current shortcut
abort(); // this will prevent the displaying of an error dialog
} |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
Hello,
I use this nice&convenient app (with well targeted scripting) for some home automation (Domoticz based, using it's http json API).
I have a suggestion for password type variables handling: An option may be added, if some password was already stored, to use it immediately and only show the password window in case of fail (to be able to update value immediately in case of server side change, for instance).
This would make remote commands needing login smoother IMO. Default may be kept as current, to avoid disturbing users that currently takes this as a confirmation step... and not already using shortcut confirmation option!
Thanks&Regards.
Beta Was this translation helpful? Give feedback.
All reactions