May, 2014
now browsing by month
I just made a video for the folder dim script.
I just made a video for the folder dim script.
Landscape recording failed somehow a bit… just believe me it works also in landscape
]]>/*
Scripts for horizontal PageScroll with PageIndicator
and simultaneously vertical “Content”Scroll
independent from ScreenResolution.
Example for a 4 Page Desktop from Left to Right
Page Home Page Page
“Pager” is a pined Panel with 3 Shortcuts (do nothing)
Definition should be:
First ShortcutWidth should be 3/4 of PanelWidth
Second ShortcutWidth should be 1/4 of PanelWidth
Third ShortcutWidth should be 3/4 of PanelWidth
See Picture.
If you have e.g. 5 page like the width should 4/5 and 1/5 …
The Shurtcuts could be designed as you like.
Good Solution would be:
First and Third a small colored Line at the Bottom
Second a thicker colored Line at the Bottom
Above the “Pager” the pined Shortcuts “Go to specified Desktop&Postion” are placed.
“Content” is a pined Panel with as many VERTICAL pages as the Desktop.
Like this:
Page
Home
Page
Page
Thanks to TrianguloY
I used a part of his Script Minimal Page Indicator
*/
// Script set on DesktopEvent PositionChange
var cont=LL. getDesktopByName(‘DesktopName’) ;
var width=cont.getWidth(); // DesktopWidth
var left = Math.round(cont.getBoundingBox().getLeft()/width);
var right = Math.round(cont.getBoundingBox().getRight()/width)-1;
var page = Math.round(cont.getPositionX()/width);
//With zoom –> no page selected
if(cont.getPositionScale()!=1) page=NaN;
else {
// pager is the panel with PageIndicator
var p1=cont. getItemByLabel(‘pager’). getContainer() ;
// content is the panel with VerticalContent
var p2=cont. getItemByLabel(‘content’). getContainer() ;
var pages=1;
// Calculation how many pages
if (left<0){
pages=right+1-left;
}
else {
pages=right+1;
}
// Width of the PagerPanel
var p1w=p1.getWidth();
// Height of the ContentPanel
var p2h=p2.getHeight();
// Multiplier in Pagerpanel a 1/x of the panel
var p1mult=Math.round(p1w/pages);
// New Postion vor PagerPanel
var pos1=(page*-1)*p1mult;
// New Postion vor ContentPanel
var pos2=page*p2h;
// set new Positions
p1. setPosition(pos1,0);
p2. setPosition(0, pos2);
}
// Script set on DesktopEvent SwipeUp
var cont=LL. getDesktopByName(‘DesktopName’) ;
var width=cont.getWidth();
var left = Math.round(cont.getBoundingBox().getLeft()/width);
var right = Math.round(cont.getBoundingBox().getRight()/width)-1;
var page = Math.round(cont.getPositionX()/width);
//With zoom –> no page selected
if(cont.getPositionScale()!=1) page=NaN;
else if (page pos1=(page+1)*width; cont. setPosition(pos1,0); // DesktopPosition will Change > First Script will take action } // Script set on DesktopEvent SwipeDown // var cont=LL. getDesktopByName(‘DesktopName’) ; var width=cont.getWidth(); var left = Math.round(cont.getBoundingBox().getLeft()/width); var right = Math.round(cont.getBoundingBox().getRight()/width)-1; var page = Math.round(cont.getPositionX()/width); //With zoom –> no page selected if(cont.getPositionScale()!=1) page=NaN; else if(page>left) { pos1=(page-1)*width; cont. setPosition(pos1,0); // DesktopPosition will Change > First Script will take action } Template where i used this: http://werksmannschaft.de/wordpress/a-kind-of-vintage-llx-themetemplate/ or here 🙂 https://play.google.com/store/apps/details?id=de.werksmannschaft.lltemplate.akov
Dim background when folder open
For a video look here: https://plus.google.com/115366157037831519359/posts/3ZY4BWnZbmp
On desktop:
– create an item
– disable it
– hide label and icon
– set label to “bg”
– set content color to black (not transparent)
set up configuration:
– dim has to be the same value in both scripts
-speed can be different
Set in folders resume event:
/*config */
var speed=10;//lower is faster, 1 for instant
var dim=150;//0 for nothing, 255 for solid black
var orientationfix=false;//true if you want to switch screen orientation while folder open
/*endconfig */
var d=LL.getCurrentDesktop();
var i=d.getItemByLabel(“bg”);
var p=i.getProperties();
d.setItemZIndex(i.getId(),d.getItems().getLength()-1);
p.edit().setBoolean(“i.onGrid”,false).setString(“i.pinMode”,”XY”).commit();
if(orientationfix){
var s=Math.max( d.getWidth(),d.getHeight())*1.1;
i.setSize(s,s);}
else i.setSize( d.getWidth(),d.getHeight());
i.setPosition(0,0);
var i=0;
var a=function()
{
i++;
p.edit().setInteger(“i.alpha”,i*dim/speed).commit();
if(i } a(); Set in folders paused event: /*config */ var speed=10;//lower is faster, 1 for instant var dim=150;//0 for nothing, 255 for solid black /*endconfig */ var p=LL.getCurrentDesktop().getItemByLabel(“bg”).getProperties(); var i=speed; var a=function() { i–; p.edit().setInteger(“i.alpha”,i*dim/speed).commit(); if(i>0)setTimeout(a,0); } a();
If you set a non opaque color to the borders of a folder, the edges look like double opaque as they should be.
If you set a non opaque color to the borders of a folder, the edges look like double opaque as they should be.
]]>Hi, I wrote a script in the Resume event of a folder. The first few lines look like this:
var item = LL.getEvent().getItem();
alert(“item=”+item);
This shows “item=null” in the resulting alert.
I expected that in line 2, item would contain a reference to the folder on which the resume event was triggered, but it looks like I’m missing something here. I want to darken the folder item on my desktop when the folder is opened, and lighten it back to the original color when it is closed. What would be the right way to achieve this effect?
Thanks in advance!
]]>Honestly – I tried to look for this myself, but…still too much for me.
I’d like a script for the lockscreen that unlocks and then goes to the home desktop.
I also remeber some talk that through scripting one could use multiple LL actions in sequence. How can I send the script to look for an action then or is this supposed to be done only via scripts?
Also I’ve got some weird issues with stop points (still on the lockscreen): I have a stop point at 0,0 position and I’ve set that as a desktop wide barrier…it worked as it should until a few days ago I was able to scroll to the left (which was supposed to be restricted).
I now added another stop point further to the left to have two different actions on the lockscreen – this works…for now at least.
Any ideas what might have happened and why?
The same weird stop point is also supposed to be the only snapping stop point so that if I don’t reach a stop point with a reached event then it returns to the original position, but often there’s no movement to the original position – sometimes I works quite well, other times almost not at all.
Could the last part be done via script? Would that be more reliable?
I’m in no rush with these scripts, so don’t push something important to a later time for me =D No need for that!
Thanks for the help, guys!
]]>