Hello
I need help from script or tasker guru. I want to create a shortcuts that move 2 panels too the specified position.
I can easily create 2 separate shortcuts. And I got the intent for the corresponding shortcuts (e.g. “#Intent;action=android.intent.action.VIEW;component=net.pierrox.lightning_launcher_extreme\/net.pierrox.lightning_launcher.activities.Dashboard;f.s=1.0;f.y=3.8146973E-5;f.x=0.46585464;i.p=137;end”).
So I tried to use Tasker as suggested in a previous discussion using the Script/Run shell task and entering in action:
am start “intent:#Intent;action=android.intent.action.VIEW;component=net.pierrox.lightning_launcher_extreme\/net.pierrox.lightning_launcher.activities.Dashboard;f.s=1.0;f.y=3.8146973E-5;f.x=0.46585464;i.p=137;end”
But it does not work on my phone. I tried a lot of thing, removing the “, removing the \ before the / (and the opposite)… I just can’t get to make it work.
So if any of you script or tasker guru could help me on that. I would be eternally grateful :p
]]>
< ![CDATA[
First you need to get the id of your panels, which is the value for “p=” (137 in this example).
Then you can make a script to set positions:
LL.getContainerById(137).setPosition(x, y);
LL.getContainerById(some_other_id).setPosition(some_other_x, some_other_y);
(replace x, y, some_other_id, etc with appropriate values)
]]>
< ![CDATA[
This worked perfectly. I should look more into scripting. I was trying to go without but it makes things a lot simpler.
]]>
< ![CDATA[
great !
]]>
< ![CDATA[
I made a script that automatically create the script you need. Check in the script section (multi container bookmark)
]]>
< ![CDATA[
Please do realise yourself, that the hardcoded ID’s break when exported to a template and imported to the another (or the same)device. Your panels will get another ID.
Possible workaround with ‘tag’ but have not tested this yet. Downside is you have to set the ‘tag’s with a separate script (one by one).
Another workaround is passing your backup (in stead of template) to another device.
]]>
< ![CDATA[
This is right, I hope to provide a name for all items soon, so that the problem is… not resolved but mitigated, because this would need a way to name items too.
But don’t share backups, this has strong limitations, in particular on scaling and widgets.
]]>
< ![CDATA[
scaling brakes too. in scripts with hardcoded x,y
]]>
< ![CDATA[
Yes, this is why it is best to use setPosition in combination with getWidth/getHeight to get device independent scroll position
]]>