Launch item with password

Launch item with password

Keep in mind it’s very easy to break this lock, just launching the item from another gesture, change the script, change the tap gesture…But here it is.

This script allows you to store a password (string) in the item, needed to launch it (so it can be a folder, shortcut, bookmark)

Instructions:

– Copy/paste this script

– Set it as the tap action of the item you want, if you want to set it to all remember to go to the container setting.

-If no password are found you will be asked to make a new one.

-You need to write the exact String to launch the item

-If you want to change an already set password write “reset:” + [your old password] example “reset:1234”

———————————-

var item = LL.getEvent().getItem();

if(item==null)return;

pin = item.getTag();

if(pin==null){

    if(confirm(“No password saved found.\nDo you want to make a new one?”)){reset();}else{item.launch();}

}else{

    var inp = prompt(“Insert Password:”,””);

    if(inp==null){return;}

    else if(inp==pin){item.launch();}

    else if(inp==”reset:”+pin){reset();}

    else{ Android.makeNewToast(“Wrong password”,true).show();}

}

function reset(){

    var newPin = prompt(“Write the new custom password:”,””);

    if(newPin==null)return;

    var new2Pin = prompt(“Write again the new custom password to confirm:”,””);

    if(new2Pin==null)return;

    if(newPin==new2Pin){

        item.setTag(newPin);

        Android.makeNewToast(“pasword saved”,true).show();

    }else{

        Android.makeNewToast(“the passwords are not the same”,true).show();

        reset();

    }

}

]]>

One Commentto Launch item with password

  1. Anonymous says:

    < ![CDATA[

    thanks for this..;;))

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *