Lutz Linke
now browsing by tag
Tried LLx with Android L (ported to Nexus 4, latest version; via multiboot).
But: When I try to switch to edit mode, LLx crashes.
Anyone else tried? Did editing work for you?
]]>Is “i.alpha” is somewhat over-optimized?
I know properties set are not persisted immediately (thanks for LL.save() BTW!!), but if I ONLY change “i.alpha”, the current value cannot be queried without restarting LL.
To reproduce:
Add shortcut “run script”, use script below. It should toggle the shortcuts transparency… but it doesn’t. It does not work until any of the other “editor.set…” functions are added. Also “LL.save()” does not help here. And if you open “Item >> Customize” it also does not show the changed transparency value.
var item=LL.getEvent().getItem();
var props=item.getProperties();
var oldalpha=props.getInteger(“i.alpha”);
var newalpha=oldalpha<255?255:64;
var editor=props.edit();
editor.setInteger(“i.alpha”,newalpha);
//editor.setBoolean(“i.onGrid”,true);
//editor.setBoolean(“i.enabled”,true);
editor.commit();
//LL.save();
]]>Editing properties of items inside panels/folders through scripts seems broken in 10.4b3. Especially “i.alpha”.
Seems to work for items on desktop (tried fading effect here, works), but changing alpha or I think font style does not work. Changes only show after “Restart LL”-action.
This and “unknown” for getType()… seems the build is pretty broken. Will try to revert to 10.4b2.
]]>Setting an icon mask for items inside a panel in panel’s “Items” configuration does not work anymore.
BTW: even if it worked, how to remove a mask once applied? Choosing “X” in new picker does not work.
]]>Pierre Hébert, I know you’re busy, but I have a suggestion you may think about: interface for extensions.
I was thinking of something like “location” or “calendar” or “weather”. Would be great if these could be queried by script to i.e. change color of an item depending on current weather, show a panel only if you’re in a business appointment or at a specific location. Or while you’re listening to music.
What do you think?
]]>Is there anyway to handle the “back” key only for single containers (or conditions)?
Handling it globally by script pretty much destroys it’s functionality to i.e. scroll back a panel.
In my case, when pressed in an opened and scrolled panel I do NOT want “back” to scroll back, but I need to execute more/other actions by script.
]]>Android L style icons, looking great!
Android L style icons, looking great!
Please add possibility to import and export scripts as JS-files.
This comes handy also for backing up between edits. Sometimes I have that nasty bug the editor (I use Quora) does not load properly and after removing the edito from “last apps” list the script is empty — read: lost!
]]>Hello all you script-maniacs, here’s a demo and description of some issues I am still stumbling upon.
I don’t know wether these are bugs or intended (though unexpected) behaviours — if so, how to do it right?
Problems:
(1) Collapsing panels to 0px height
(2) Changing properties of items inside a panel not persistent
Collapsing to 0px – Intro
I want to collapse a panel to 0px height by script.
This requires
– panel dettached from grid — obviously
– rows set to NUM, not ROWS
– FitDesktopToItems = false
Collapsing to 0px – Issue 1
If FitDesktopToItems is “true” (what’s the preferable setting), instead of shrinking to 0px the panel is sized to a height which is, well, fit to the height of all items included.
Collapsing to 0px – Issue 2
If FitDesktopToItems is “false”, the panel is shrunk… but only if there aren’t any paddings, margins or borders at top or bottom! Otherwise instead of 0px the panel’s height is the sum of all top plus bottom paddings, margins and borders.
My current very ugly workaround is setting to 1px (which works good, with only a few border’s pixels remaining left and right) and changing Visibility to false.
Changing item properties
If I change properties of items inside a panel via script (like transparency, color, bold/italic/normal), it seems to work… but only until properties of the panel are changed. Or better: even edit()/commit() without changing anything is executed. Doing so causes the item’s properties to revert to their previous values; not default (think: inheritance). They seem to be “persisted” however after a while, a restart of LL, … I don’t know…
I tried starting “edit()” of the panel item and/or container before changing the item’s properties and commit() afterwards, but this did not help. IIRC it immediately causes reverting.
Am I doing something wrong or is this a bug?
DEMO Template
Here’s a template with the demo screen and scripts.
https://app.box.com/LL20140617Demo
Functions:
– “Mark items” (_script1): toggles transparency of the items inside the panel
– “Edit panel” (_script2):
– Answering “Change panel properties” with “Cancel” only does edit().commit() for container (this commit reverts the item changes) and item (this does not)
– “OK” allows to change some properties: RowMode, FitDesktopToItems, Dettach, Borders/Margins/Padding through series of confirm-dialogs
– “Toggle panel”: allows to collapse/expand the panel height to 2 rows, 0px or 1px through series of confirm-dialogs.




How to execute a script synchronously?
I read in release notes for 9.9.10 that the script engine is now synchronous.
But still when i.e. called LL.RunScript(“script1”,null); LL.RunScript(“script2”,null); both are executed asynchronous on parallel. How to solve if script2 requires script1 to be finished?
I tried something like setTimeout(new function() { LL.RunScript(“script1”,arg1); },1000); setTimeout(new function() { LL.RunScript(“script2”,arg2); },2000);, but both the anonymous function does not seem to work, the script are executed immediately, not with delay.
function RunScript1() { LL.RunScript(“script1”,null); };setTimeout(Runscript1,1000); does work with delay, but it is not possible to pass arguments.
Any ideas?
]]>
D5 Creation