TrianguloY I hope you can give me some help with your scripting knowledge.
TrianguloY I hope you can give me some help with your scripting knowledge.
Maybe it is a bug… Anyway, I think the problem is commit method.
I had the same problem with another one of my scripts that use two commit() in the code, and there was also the “property set” to statusbar and navbar.
I guess it’s better if I post directly the code here:
——————————
var desk=LL.getCurrentDesktop();
var edit=desk.getProperties().edit();
var maincol= LL.pickColor(“main color”,0xffffffff,true);
if(maincol!=null){
edit.setInteger(“statusBarColor”,maincol);
edit.setInteger(“navigationBarColor”,maincol);
LL.setVariableInteger(“main”,maincol);
}
edit.commit();
——————————
The video shows that works only the first time, as in the previous script
]]>
< ![CDATA[
Thanks for mention me, but keep in mind there are excellent script masters in this community 😉
From what I see and guess (a better description of the problem will be appreciated) the script works, as the bars color change correctly.
I guess the problem is that the background doesn’t change, and I guess you are using the variable throw bindings to make this.
If those assumptions are correct, I think Pierre Hébert will explain better the behavior, and why changing the variable doesn’t trigger the binding change.
]]>
< ![CDATA[
Yes, i set the box content color of items using the variable called “main” in bindings
]]>
< ![CDATA[
I don’t know. Does commenting out the last line “edit.commit();” make the box color change?
]]>
< ![CDATA[
Pierre Hébert no, it confirm the currentDesktop properties
]]>
< ![CDATA[
I tried your script and it works fine for me, I don’t know what could be the issue. For the binding formula I have “c:”+$main
Do you have something different? And does it change if you manually change the value of main using shortcut actions “Set a variable” ?
]]>
< ![CDATA[
Pierre Hébert in bindings i use exactly that syntax, and yes, it does.
The problem appear only when i use “statusBarColor” and/or “navigationBarColor” combined with other PropertyEditors:
the first time everything works, then only statusbar and/or navbar changes are validate.
]]>
< ![CDATA[
Could you share your desktop as a template please ?
Maybe it is related with https://plus.google.com/u/0/103259407078462677041/posts/hS5U8RCJXpa
]]>
< ![CDATA[
Pierre Hébert it’s not “main color” script by TrianguloY, I made it by my self.
Anyway here is the template: https://www.dropbox.com/s/ojg2sqthwp0dy95/various%20experiments?dl=0
]]>