Is it possible to make a Toggle-able control for options from other scripts? #1110
-
I am trying to have a toggle-able control for an autoskip function using the SmartSkip script. https://github.com/Eisa01/mpv-scripts/#smartskip From reading the explanation of the controls syntax for uosc.conf, it seems like toggle and cycle elements only work for mpv properties. I did try with the SmartSkip option In the end I had to go with the command element So is there no way to make control icons toggle-able for options from other scripts? It would be a nice feature to have. Is there an interesting solution to this besides a feature request? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
No. uosc can't see into values of other scripts. The other script has to make uosc aware of the values. They can either do it via sending
and users can then tap to that prop in their buttons with
and users can then just use that as a button in their controls using This is all documented in: https://github.com/tomasklaen/uosc/wiki |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help, Tomas. I was able to edit the lua file for SmartSkip successfully using If anyone else finds it useful, I'll detail how I did it thanks to the info provided by Tomas. Near the start of the 'SmartSkip.lua' file, after the local variables are set and initialized, I added:
Then, I modified the
Under the previous function:
For 'uosc.conf', I added Finally, a key binding to 'input.conf': Now the autoskip button I have added as a control happily toggles back and forth from clicking on it or pressing the 'k' key. |
Beta Was this translation helpful? Give feedback.
No. uosc can't see into values of other scripts. The other script has to make uosc aware of the values. They can either do it via sending
and users can then tap to that prop in their buttons with
<prop>@<script>
, or even better, they can define and update their custom button by sending:and users can then just use that as a button in their controls using
button:<name>
.This is all documented in: https://github.com/tomasklaen/uosc/wiki