now browsing by category

 

m is not defined

m is not defined

I’ve got a feedback which is about my Windwos 7 LLx template.

When user press START button in the bottom-right(see pic.) which is a LL folder in panel(statubs bar), sometimes that button was not responding and show error message, “m is not defined…”

Wierd thing is that in my script(z.alogblog…statButton)’s Line 2 and whole lines, there is no “m” object.

Probably “m” is LL’s inner Java or Javascipt object? If so, why did that problem rise?

]]>

hey guys, i am pretty new to scripting and want to know if it is possible to use  http://jsbin.com/ for…

hey guys, i am pretty new to scripting and want to know if it is possible to use  http://jsbin.com/ for testing/making scripts in LLX becuase there is a live output on that page of the scripts

http://jsbin.com
]]>

Remember the first one, from a week ago? Here’s my LLX version.

Remember the first one, from a week ago? Here’s my LLX version.

The menu-item s animation is still under construction.

/* ReSide Menu item click */

var itemP = LL.getEvent().getItem().getTag();

var desk = LL.getCurrentDesktop();

var pos = 2 * itemP * desk.getHeight();

var RSM = desk.getItemByLabel(“RSM”);

var Mps = RSM.getContainer().getItems();

var n = Mps.getLength();

function pausecomp(ms) {ms += new Date().getTime();while (new Date() < ms){}};

for(var i=0;i

if (Mps.getAt(i).getType() == “Panel”)

{

Mps.getAt(i).getContainer().setPosition(0,0,1, true);

pausecomp(23);

}

}

RSM.getContainer().setPosition(0,0,1, true);

desk.setPosition(0,pos, 1, false);

]]>

simple problem (i hope)

simple problem (i hope)

i have a desktop > named/labeled myDesktop

on the Desktop is a Panel > named/labeled myPanel

in the panel is a shortcurt > named/labeles myShortcut

i want to change some properties of this Shortcut.

i do not want to work with hard coded IDs from panels and shortcuts,

because i don’t know whether they keep them.

one (i made a lot of) example for what i’ve tried before

var desk=LL.getDesktopbByName(‘myDesktop’);

var panel=desk.getItemByLabel(‘myPanel’);

/*

panel is now an Item not a  Container  

try to find the ContainerId

*/

var pcon=LL.getContainerById(panel);

/*

so far it works

trying now to find the Shortcut

*/

var shortcurt=pcon.getItemByLabel(‘myShortcut’);

/*

failed

Cannot find function getItemByLabel in object # (where # is a Id) 

*/

some ideas?

]]>

Hmmm.

Hmmm. Now that we have scripts can anyone think of a way to set my sidebar animation to follow the one used by the Reddit News app? Essentially, the wallpaper/clock would be on top of the sidebars and would slide over to reveal them sitting underneath. Video for demonstration.

http://www.youtube.com/watch?v=2aa1K6BTWBs
]]>

Hey folks got a quick question…i’m a newbie with the scripts so here goes…can anyone give me the steps to go…

Hey folks got a quick question…i’m a newbie with the scripts so here goes…can anyone give me the steps to go about doing the page indicator…what to add and adding the script to it…i’ve inputed the script itself but have no clue after that…do i add an app or shortcut etc…and the steps after that…thanks in advance for any help

]]>

Sorry, next Question ;-)

Sorry, next Question 😉

how do i run a script from another script (and return)?

or is it possible to “include” scripts?

]]>

regarding my post: TrianguloY

regarding my post: TrianguloY 

https://plus.google.com/u/0/+gerdreuter/posts/XuAVWHWRCpJ

you can see the panels in the background of the screenshot.

a red,  blue, green and yellow panel.

they are definitely not at 0,0

]]>

Script maker tool

Script maker tool

I was planning to add a video…but I decided to not do it (you have a preview some post ago)

This tool is a script that makes scripts. You don’t need to know programming, and also this will provide you personal examples if you want to learn. The sub-scripts are Lightning shortcuts that can be done from scripting. (Please: note that long scripts can be less efficient)

The instructions are very simple:

– Copy this script and check the ‘appear in’ ‘item menu’ and ‘lightning menu’

– Run this script from where you want. If you do it from a shortcut or folder, launch/open. sub-scripts will also be available.

– Write the letters you want. One after another, for example ‘h1b’

– Copy the output script and run it whenever you want. It will do what you choosed.

Available sub-scripts are:

1,2,3…- X seconds pause

b- Desktop Bookmark: Go to this container position

z- Zoom 100p

l- Full scale

t- Toogle zoom full scale/100p

h- Go to home desktop

n- Next desktop

p- Previous Desktop

u- Unlock screen

c- Close Top-most folder

a- Close all folders

f- Open this folder (if available)

s- Launch this shortcut (if available)

Feel free to comment and suggest others sub-scripts.

(If google+ syntax broke it let me know.)

———————————–

//Vars

var e = LL.getEvent();

var c = e.getContainer();

var it = e.getItem();

//Input

var folshor = 0;

if(c.getId()==-1)c=LL.getCurrentDesktop();

if(it!=null)if(it.getType()==”Folder”){folshor=1;}else if(it.getType()==”Shortcut”)folshor=2;

var input = LL.getScriptTag() || “”;

var info = “Write the secuence in order, for example ‘u1hz’ :\n\

1,2,3…- X seconds pause\n\

b- Desktop Bookmark: Go to this container position\n\

z- Zoom 100p\n\

l- Full scale\n\

t- Toogle zoom full scale/100p\n\

h- Go to home desktop\n\

n- Next desktop\n\

p- Previous Desktop\n\

u- Unlock screen\n\

c- Close Top-most folder\n\

a- Close all folders\n”;

info+=”\n”;

if(folshor==1)info+=”f- Open this folder\n”;

if(folshor==2)info+=”s- Launch this shortcut\n”;

var list = prompt(info,input);

if (list==null)return;

LL.setScriptTag(list);

//maker

var scriptbeg=””;

var scriptend=”\n\/\/Made with TrianguloY’s script maker tool”;

var indent=””;

for(var i=0;i

var code = list[i];

if(code==” “||code==”\n”)continue;

scriptbeg+=indent;

if(code>=’1′ && code<='9'){

var n=parseInt(code);

scriptbeg+=”setTimeout(function(){\/\/ Launch after…”;

scriptend=indent+”},”+n+”000);\/\/…”+n+” second”+(n==1?””:”s”)+”\n”+scriptend;

indent+=” “;

}else

switch(code){

//case ‘0’:

case ‘b’: scriptbeg+=”LL.getContainerById(“+c.getId()+”).setPosition(“+c.getPositionX()+”,”+c.getPositionY()+”,”+c.getPositionScale()+”,true);\/\/Desktop Bookmark”;

break;

case ‘z’: scriptbeg+=”c.setPosition(0,0,1,true);\/\/Zoom 100p”;

break;

case ‘l’: scriptbeg+=fullScaleText(false);

break;

case ‘t’: scriptbeg+=fullScaleText(true);

break;

case ‘h’: scriptbeg+=”LL.goToDesktop(LL.getHomeDesktop().getId());\/\/Go to home desktop”;

break;

case ‘n’: scriptbeg+=npdesktop(“+”);

break;

case ‘p’: scriptbeg+=npdesktop(“-“);

break;

case ‘u’: scriptbeg+=”LL.unlock();\/\/Unlock”;

break;

case ‘f’: if(folshor==1)scriptbeg+=”LL.getItemById(“+it.getId()+”).open();\/\/Open folder”;

break;

case ‘s’: if(folshor==2)scriptbeg+=”LL.getItemById(“+it.getId()+”).launch();\/\/Launch item”;

break;

case ‘c’: scriptbeg+=”var f=LL.getOpenFolders().getAt(0); if(f)f.close();\/\/Close topmost folder”;

break;

case ‘a’: scriptbeg+=”var fl=LL.getOpenFolders(),fll=fl.getLength(); if(fll>0)for(var i=0;i

break;

default:scriptbeg+=”\/\/Order not found “+code;

}

scriptbeg+=”\n”;

}

prompt(“Here is your script :3 Just copy/paste and run”,scriptbeg+scriptend);

/*NOTES:

The getCurrentDesktop() is in every subscript because it can change

*/

//Vars, functions

function npdesktop(sig){

var str = “var c = LL.getCurrentDesktop(),l=LL.getAllDesktops(),i;”;

str+=”\/\/Go to ” + (sig==”+”?”next”:”previous”)+” desktop\n”;

str+=indent+” for(i=0;i

if(sig==”+”){

str+=indent+” if(i==l.getLength()-1)i=-1;\n”;

}else{

str+=indent+” if(i==0)i=l.getLength()-2;\n”;

}

str+=indent+” LL.goToDesktop(l.getAt(i”+sig+”1));”;

return str;

}

function fullScaleText(tog){

var str = “var c = LL.getEvent().getContainer()||LL.getCurrentDesktop();”;

str+=”\/\/”+(tog?”Toogle zoom full scale/100p”:”Zoom full scale”)+”\n”;

if(tog)str+=indent+”if(c.getPositionX()==0&&c.getPositionY()==0&&c.getPositionScale()==1){\n”;

var ind=tog?” “:” “;

str+=indent+ind+”var box = c.getBoundingBox();\n”

str+=indent+ind+”var layout = [box.getRight()-box.getLeft(),box.getBottom()-box.getTop()];\n”

str+=indent+ind+”var scale = Math.min(c.getWidth()/layout[0],c.getHeight()/layout[1]);\n”

str+=indent+ind+”var pos = [ box.getLeft()- (c.getWidth()/scale-layout[0])/2 , box.getTop()-(c.getHeight()/scale-layout[1])/2 ];\n”;

str+=indent+ind+”c.setPosition(pos[0],pos[1],scale,true);”

if(tog)str+=”\n”+indent+”}else c.setPosition(0,0,1,true);”;

return str;

}

]]>

hi, since today i have LLX V10.

hi, since today i have LLX V10.

first time i tried this script from TrianguloY 

https://plus.google.com/u/0/105066926163073195690/posts/KxhjoFxQ4iJ

i have desktop with 4 panels.

Script does not work ;-(

all positions are 0

runing the “result”-script does nothing

all panels should be at 0,0

undependend wether my panels are detached from grid or not.

any idea?

]]>