now browsing by category

 

Hi, I am looking for a way to change my wallpaper automatically every weeks.

Hi, I am looking for a way to change my wallpaper automatically every weeks.

I found that script wich change the wallpaper every times it is launched.

I dont know how to script at all, so maybe someone can make the necessary changes to make it work the way I want ?

Here is the script :

LL.bindClass(“java.lang.Runtime”);

LL.bindClass(“java.io.File”);

var wallpaper_dir = new File(“/storage…”) //replace with wallpaper directory

var container_id = LL.getCurrentDesktop().getId() ;

var ll_wallpaper = new File(LL.getContext().getFilesDir() + “/pages/” + container_id + “/wp”);

ll_wallpaper.delete();

var wallpaper_list = wallpaper_dir.listFiles()

var index = Math.floor((Math.random() * wallpaper_list.length));

var rt = Runtime.getRuntime()

rt.exec(“cp ” + wallpaper_list[index].getAbsolutePath() + ” ” + ll_wallpaper.getAbsolutePath());

LL.runAction(EventHandler.RESTART);

]]>

is there a way (through script or otherwise) to automatically insert a space at the end of every app label in the…

is there a way (through script or otherwise) to automatically insert a space at the end of every app label in the app drawer? I’m using a custom font that doesn’t show up properly unless there is a space at the end of the text. the font is called alphabetic kanji.

https://fontstruct.com/fontstructions/show/1442265/alphabetic-kanji
]]>

Script ‘Fix for Oreo app drawer not refreshed on LL 14.2’

Script ‘Fix for Oreo app drawer not refreshed on LL 14.2’

Important!

This is a script to fix the bug ‘apps are not updated on the app drawer automatically’. This happens on Android Oreo and above with LL version 14.2. If you don’t use Oreo or you are reading this from the future when a new LL version is available (to be more precise: if when you install a new app it is added automatically to the app drawer) then you do NOT need this script. Otherwise, if you have the mentioned bug, keep reading.

On Android Oreo the way to detect installed/uninstalled/updated apps was changed. Previously any app could register to a broadcast that was sent when a package was installed, uninstalled or updated. Since Oreo that feature was removed and the broadcast isn’t sent. There are two ways to fix this: register to the broadcast while the app is running (it will be lost if the app closes…and personally couldn’t make it work) or use a new function that tells you which packages were updated since a previous call.

I could make this second way work, with some caveats, but under normal circumstances it should work.

When running the script below the app drawer will be updated. It requires manual calling but it is fast so I recommend setting the script to run on the RESUMED event of the app drawer. This way when opening it will be updated.

Known bugs: when the device is restarted (turn off/on) the list is cleared, so if you install/uninstall an app and then restarts without running the script, that app won’t be updated correctly. Remember you can use the ‘refresh’ function from the app drawer to fix this.

Also, keep in mind this is a temporary fix that can have unknown bugs or work incorrectly on some devices/versions. Make a backup first!!! (just in case).

Comment anything you found, and if you know how to fix something or make the script more reliable don’t hesitate to do so and share!

To recap: make a backup, set this script to run in the resumed event of the app drawer, and keep in mind you will probably need to refresh after a device restart.

]]>

Hi there

Hi there,

does anyone have a script that changes the icon on keypress. much appreciated.

]]>

Hi i m just a new user learning to use the script to create some simple effect

Hi i m just a new user learning to use the script to create some simple effect

(i swype on the desktop, the shortcuts and widget from the right hand side of the screen getting in and increase the transparency from 0 to 255,so it looks like fading in from RHS)

i m fine with the shortcut i used the follow script or called api

but i failed to do the same thing on the widget

var d = LL.getCurrentDesktop();

var x = d.getPositionX();

var i = d.getItemByName(“Timetable”);

var i2 = d.getItemByName(“calendar”);

var a = x/1335*255;

/1335 is my horizontal screen width/

i.getProperties().edit().setInteger(“i.alpha”,a).commit();

i tried the same api by replacing i to i2

i2.getProperties().edit().setInteger(“i2.alpha”,a).commit();

it throws me an error

i think this is because of i2 a widget but i is a shortcut

any idea or suggestion on the modification?

sorry for my bad english

many thanks

]]>

Is it possible to link an event to an Item (shortcut, Panel, Folder, …) in a script ?

Is it possible to link an event to an Item (shortcut, Panel, Folder, …) in a script ?

For example: I’m creating shortcuts in a script and I would like to associate an event (eg. call another script with specific parameters) when the shortcut is ‘long tapped’. Is this possible ?

Thanks in advance for your help!

]]>

Hi

Hi,

I’m looking for help.

I would like to create shortcuts to my recent contacts in a script. Using tasker and AutoContact, I’m able to build a JSON array containing the contact ID and contact name of the 10 last recent contacts.

The goal is to iterate this JSON array in a script that would build a list of shortcuts to open these contacts and add them in a Panel.

Part of the script I’m using to create the shortcut based on the contact ID:

var contactID = “207”; //to be iterated

var contactName = “My Contact”; //to be iterated

var intent = Intent.parseUri(“content://com.android.contacts/contacts/” + contactID + “#Intent;action=android.provider.action.QUICK_CONTACT;type=vnd.android.cursor.item/contact;launchFlags=0x10018000;B.com.android.launcher.intent.extra.shortcut.INGORE_LAUNCH_ANIMATION=true;end”,0);

var addedShortcut = myPanel.getContainer().addShortcut(contactName ,intent,0,0);

It works fine: the shortcut is created and it opens the contact but I need help to retrieve the icon that corresponds to the contact: sometimes it is a picture, somtimes it is a material icon representing the first letter of the contact name. Any idea how I could achieve this ?

Any hint/idea is welcome!

]]>

Last one for tonight.

Last one for tonight.

Would any of our Javascript Gurus be kind enough to provide a script, which could be assigned as an item’s action (for example, on swipe up), which will open http://www.google.com?

I’d like to use it as a template, and modify the URL, as needed, to create several shortcuts.

http://www.google.com
]]>

Fix Oreo icons

Fix Oreo icons

This script was created to fix the ‘items without icons on android Oreo’ bug until Pierre implements it.

The script sets the adaptive icons of the shortcuts apps that uses them, unsupported on lighting 14.2b1.

This script ONLY WORKS on android Oreo.

Configuration:

You can change the roundness of the icons changing the ROUNDVAL value on the first line of the script. A value of 0 means no round, aka square. A value of 1 means all round, aka circle. Any value inbetween makes a rounded square. Also, a value of -1 uses the system default shape (whatever that is).

By default 0.35 because I find that good enough.

You can also change the relative size of the inner icon by changing the ZOOM value. A value of 1 means no scale, but the icon is very small. A value of 2 make the icon double size, but it is too big. Any other value correspond to the specified scale.

By default 1.25 because that seems the best size for me.

How to use:

After copying it and paste as a new script in the script editor REMEMBER to enable the lighting menu and item menu categories (swipe from the left). Then you can:

Run from an item to change that item’s icon. If the icon already have a custom icon it will ask to override.

Run from a container to change all item’s icon from that container and subcontainers recursively. It will ask to override custom icons or not.

Run from any other event to change items’s icons from that container recursively without asking for overriding (won’t override). Use this for automation.

If you have any issues write a comment and I’ll try to help. Also if you want to improve the script feel free to do so and share it! A mention is just enough.

]]>

Web Shortcuts for all devices without installing other apps 😊

Web Shortcuts for all devices without installing other apps 😊

Script is in the first post after copying it open the script editor application and paste the script slide out the script editor drawer and tick the lightning menu checkbox so it appears under the scripts menu as shown in the video.

]]>