[RELEASE] AutoWidget - Let your widgets work for you!
(2020-11-21, 19:02)justin150 Wrote:
(2020-08-19, 22:06)drinfernoo Wrote:
(2020-08-19, 20:06)justin150 Wrote: This is a complicated question that may or may not have an easy answer - but I am so far beyond my coding ability I really badly need help!!

I have in the Silvio skin (actually a mod of it) created a new style of widget: the Autowidget panel, which has a dedicated button to refresh the widget beside the panel widget (the skin is designed for use on a tablet).  That button will have assigned to it in the template.xml the refresh command RunPlugin("plugin://plugin.program.autowidget/?mode=refresh&target=YOUR_ID_HERE").  In order to do that I need to parse the relevant widget path to (a) make sure that the widget is an autowidget cycling group and (b) strip out the ID then I can create a command

<onclick>RunPlugin($VAR[Static_String]$VAR[Variable_String])</onclick> where the Static_String would be "plugin://plugin.program.autowidget/?mode=refresh&target=" and the Variable_String would be autowidget ID (or something along those lines).  That way it should work no matter how many different autowidget panel widgets the relevant build has.

Has anyone got ideas and could help with the actual coding - I feel at least part of the solution might be in script.module.routing but as I said I have gone so far beyond my abilities it is embarrassing

For one thing, the path you'll actually need to use is:
syntax:
RunPlugin("plugin://plugin.program.autowidget/?mode=refresh&id=YOUR_ID_HERE")

You were close, but the parameter should be id instead of target.

I think the best way to handle getting the actual ID from the widget may be for me to attach it as a List item property, probably named autoID. Then you could not only control visibility of the control based on whether or not that property is filled, but you could use $INFO[Container(CONTAINER_ID).List item.Property(autoID)] to fill the needed parameter in the plugin path. I can make a small update to add that property Big Grin

At least, that's how I understand it... Perhaps somebody like @jurialmunkey would confirm that my logic is sound there, but I think it should work Wink

I got massively side tracked by life and have only just got back to this.  Did the sensible thing and loaded up the current development version of autowidgets.

Because I am using a mod of the silvio skin I believe the syntax I should use at least for widget 1 is $INFO[Container(8011$SKINSHORTCUTS[id]).ListItem.Property(autoID)] 

So for a button command that should mean RunPlugin("plugin://plugin.program.autowidget/?mode=refresh&id=$INFO[Container(8011$SKINSHORTCUTS[id]).ListItem.Property(autoID)] ")

Sadly this is not working - in fact even $INFO[Container(8011$SKINSHORTCUTS[id]).ListItem.Property(autoID)] returns no information.

Please can someone help me on this!!

You need to find the container ID. 8011$SKINSHORTCUTS[id] looks wrong to me... it should just be numbers.

If you turn on Skin Debugging from AutoWidget -> Tools -> Toggle Skin Debugging, and then navigate to a widget, the overlay should tell you it's container ID.

EDIT: This may also be helpful: https://github.com/drinfernoo/plugin.pro...tainer-IDs
Reply


Messages In This Thread
RE: [RELEASE] AutoWidget - Let your widgets work for you! - by drinfernoo - 2020-11-22, 06:41
Suggestion for next version - by justin150 - 2021-03-08, 13:37
Android Shortcuts - by JSAKelley - 2022-01-12, 05:33
RE: Android Shortcuts - by jdig4240 - 2022-01-12, 07:11
RE: Android Shortcuts - by JSAKelley - 2022-01-12, 16:10
RE: Android Shortcuts - by jdig4240 - 2022-01-12, 16:51
RE: Android Shortcuts - by JSAKelley - 2022-01-12, 23:19
Logout Mark Read Team Forum Stats Members Help
[RELEASE] AutoWidget - Let your widgets work for you!1