Hi TrianguloY
Hi TrianguloY
Could you help me there : i’ve filled a new variable with 0/1 named Block
I want to run a. Script for quick unlock when 0
if($Block == 0){
/* OK for quick unlock*/
/* unlock if locked*/
if(LL.isLocked()){
LL.unlock();
}
}
Seems my ii is not correct, tried with $LL_Block, with ‘ ‘
Is there some ‘Read Variable’ to be done ?
]]>« Hi all (Previous Post)
(Next Post) Hi, I want to use LL.getDesktopByName in one of my scripts, but I can’t find anywhere in the settings to pick a name… »
< ![CDATA[
http://www.pierrox.net/android/applications/lightning_launcher/script/reference/net/pierrox/lightning_launcher/script/api/LL.html#getVariables()
]]>
< ![CDATA[
TrianguloY so getString ?
]]>
< ![CDATA[
I will say getFloat
]]>
< ![CDATA[
TrianguloY not working
var brulock = LL.getFloat($Block);
alert(brulock);
if(brulock == 0){
/* unlock if locked*/
if(LL.isLocked()){
LL.unlock();
}
}
]]>
< ![CDATA[
Please, read the api, don’t guess.
LL.getVariables().getFloat(“Block”)
]]>
< ![CDATA[
TrianguloY I’ve not seen where it is. Please point me to the right place
Working fine. Many thanks
]]>
< ![CDATA[
I posted the link O.o
]]>
< ![CDATA[
TrianguloY sorry but I’m not able to see this detail on the link.
Is it because I’m using my smartphone ?
I have another question : how can I set a value for the same variable by script ?
LL.setVariable().setFloat(“Block”) = 1 ;
]]>
< ![CDATA[
Found that on the link
LL.getVariables().edit().setFloat(name, value).commit();
]]>
< ![CDATA[
So I’ll try
]]>
< ![CDATA[
LL.getVariables().edit().setFloat(“Block”, 1).commit();
]]>
< ![CDATA[
You need to understand how the api works. And I can see it from the browser correctly.
Click an object to see the functions of that object. You can see the parameters required (between the parenthesis) what it returns (at the left) and a brief description, a bigger one at the bottom.
Answering your question:
LL.getVariables().edit()
.setFloat(“Block”, 1)
.commit();
]]>
< ![CDATA[
TrianguloY yes it was my instruction too because an example was there for edit
But no example was for getting the value.
Thank you for your patience with me 😊
]]>
< ![CDATA[
Ah! Missed your replies, sorry 😛
]]>
< ![CDATA[
TrianguloY no prob
It’s great to have a teacher like you
Could you send me a screenshot with the get thing ? I can’t see how you found the first instruction
]]>
< ![CDATA[
On the link I wrote!
LL object, there you have the getVariables function.
At the left it says VariableSet, that’s what it returns. Click it, you have the edit function that returns a VariableEditor, click it and check the example
]]>