now browsing by category

 

OK, tried to start with scripting – but need help.

OK, tried to start with scripting – but need help. I want certain item (panel in this case) to be pinned when some event occurs, but in API didin’t found nothing related to pinned/unpinned state. How to get item pinned state and modify it?

]]>

Fantastic editor. Those extra keys above the keyboard is a great functional extension.

Originally shared by Lutz Linke

Fantastic editor. Those extra keys above the keyboard is a great functional extension.

https://market.android.com/details?id=com.henrythompson.quoda
]]>

Holes

Holes

This is a script that will move a panel to the opposite of the desktop, to give the illusion that it is a hole.

Check the video to better understanding. It is difficult to understand I know, but the fact is that both are panels, both are placed relative to the screen, not the desktop. That’s why it makes the illusion of holes, but they are panels!

It works also with zoom, and it move all the panels labeled “Hole” in the container.

It works also with panels inside folders, panels inside panels, etc. But to avoid misunderstanding the instructions says ‘desktop’ for the parent and ‘panels’ for the child panels it has.

Have in mind that you will be able to see only the main page of the panel, it’s recommended to check ‘use desktop size’ under layout on the panels settings. This will help you setting it.

Instructions:

– Copy/paste this script as a new one.

– Set it to run on the position change event of the desktop. Only the desktop, NOT the panels!

– Label the panels you want to as “Hole”, the others won’t work;

– [Optional] Disable the scrolling of the panels (Scroll direction: No scrolling at all)

– [Optional] Check the no scroll limit of the desktop, disable snap to pages and enable pinch to zoom and diagonal scrolling to move freely the panel.

These last two instructions are just optional, maybe you find an awesome way of using this script without them.

Pierre Hébert: This is the script that shows why you need to round the position, in case you want to test.

There is also another bad behavior that is shown when using this script. If you zoom the desktop, the panel will unzoom, but in edit mode the grid lines and the helpers are really really big, because the panel think it is really big (and it is, but not for the user). Not exactly a bug, but maybe you can think in this to give them an absolute size relative to the screen, not the container and their zoom.

——————————

//Vars

var desk =LL.getEvent().getContainer();

var scale = desk.getPositionScale();

var items=desk.getItems();

//for each item

for(var i=items.getLength()-1;i>=0;–i){

var panop = items.getAt(i);

if(panop.getLabel()!=”Hole” || panop.getType()!=”Panel”)continue;//only panels labeled “Hole”

var pan=panop.getContainer();

//Relative position

var posX= Math.round(panop.getPositionX())-desk.getPositionX();

var posY= Math.round(panop.getPositionY())-desk.getPositionY();

//The offset of the position if the panel has margins/borders/padding respectively

//if your pannels don’t have, you can comment this section to avoid extra operations

var prop=panop.getProperties().getBox(“i.box”); posX+=prop.getSize(“ml”)+prop.getSize(“bl”)+prop.getSize(“pl”); posY+=prop.getSize(“mt”)+prop.getSize(“bt”)+prop.getSize(“pt”);

//the final position

pan.setPosition( posX*scale , posY*scale ,1/scale,false);

}

]]>

Coloring My Drawer

Coloring My Drawer

https://github.com/alogblog/coloringMyDrawer/blob/master/coloringMyDrawer.js

How to use:

1. Copy and paste code into script editor.

2. Insert LL’s “Restart app” shortcut into a desktop.

3. Go to My Drawer, and open its setting.

4. In events option, set Load action to Run Script/your pasted one.

5. Run “Restart app* shortcut.

6. Go to My Drawer again.

7. Then script will ask some option, just select default.

Non latin alphabet users

In the script, you can edit an array for your alphabet’s grouping chars.

Limit on current LLx(10.0.2)

1. LLx’s script engine doesnt do setCell() API permanently. So after you set each app blocks to start from new line, and exit from drawer, its changed position is restored. T.T

Hence until LLx can do it permanently, its of no use.

2. We can’t run this script out of drawer. LLx item.setCell() API doesnt work if item is not loaded. So we used Restart app method for using LOAD event.

LL’s Bug?

If we set drawers LOAD action, strangedly LLx run its action on loading and UNLOADING.

]]>

Can anyone help me with “runScript” and “getData”? There seems to be a problem with passing the parameter…

Can anyone help me with “runScript” and “getData”? There seems to be a problem with passing the parameter…

script1:

LL.runScript(“script2″,”myPanel”);

script2:

var d = LL.getCurrentDesktop();

var e = LL.getEvent();

var p = e.getData();

alert(p);

var i = d.getItemByLabel(p);

I have a panel labeled “myPanel” on the desktop.

I run script1 from a shortcut.

Alert shows ‘myPanel’.

getItemByLabel returns NULL.

BUT: if I directly use d.getItemByLabel(“myPanel”), the panel is found.

Is this a bug?

]]>

Published my Scripts which i used for carousel

Published my Scripts which i used for carousel

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

http://werksmannschaft.de/wordpress/carousel-script/

i am not a Javascript-Genius and there are a few limitations in LLX-JS,

but it works fine and fast 

😉

Suggestions, Ideas etc. are welcome

http://werksmannschaft.de/wordpress/carousel-script
]]>

Another scripting question – or maybe feature.

Another scripting question – or maybe feature. 

#> Any way to get the value from dynamic text?

For example you could then change the background color a phone icon from say black to read if the number is larger than one.

The icing on the cake would be an event that triggered the script on dynamic text value change.

If i’m missing something and this can be done already someone should let me know.

If not – well its just a thought! 

]]>

request:

request:

i have folder with some items (widgets and shortcuts). I need after click  to widget automatic close folder. I set for this widget (switch) gesture for tap (close folder). This is ok.

But i need too… if i tap to some app shortcut from this folder, doing 1) run app, 2) close this folder.

Can somebody doing script for this? Thanks

]]>

Hi All

Hi All, 

Can anyone good with the scripting help me out (not too much as i’m trying to learn – lol). 

But in short I want a horizontal panel that will move up and down the screen following your finger as if it was pulled. 

So far I have the following which is both broken and won’t do what I want even if it did work.  Horray!

Self.SetPosition(0,500);

var y = self.getPositionY();

Andriod.makeNewToast(y,true).show();

So i guess i’m probably using self incorrectly. I would try using a var set to getItemById()  and then try and use it to set the position, but am not sure how to find out the ID of my container. 

I also have no idea how to get the Y position of the last coordinates. I have looked through the API guide but am a little lost. 

Any help appreciated!

]]>

Hi all

Hi all,

I have a Runscript question.

Are scripts i call with runscript running parallel to the callerscript?

]]>