Is this possible with LLX just wanna be sure before I recommend it.
Is this possible with LLX just wanna be sure before I recommend it.
]]>
(Next Post) Folks, pretty new to LLX, coming from SmartLauncher. »
< ![CDATA[
yes I was just thinking of asking this very question myself but I forgot why I needed to. . I do know I’d like to trigger tasks based off llx actions (specific folder open or page_end reached for example)
]]>
< ![CDATA[
Yes.
Inside a desktop you can use stop points and their “reached” event: set a shortcut to a tasker task and you’re done.
For navigation between desktops, use the resume event (but it will fire more often that necessary). It will work for folders too.
]]>
< ![CDATA[
For the reached event on stop point I got (maybe) a bug (my stop point has the barrier option) : when I reach it, it doesn’t do anything thing, but if I try to overtake, the script is launched…
]]>
< ![CDATA[
I tried using 1 stop point to trigger a task when the end was reached but I ran into a few complications (1. it broke the snap to pages option so it wouldn’t snap to pages anymore 2. it required at least 3 stop points to fix when I only wanted 1 and 3. the event didn’t fire at all when it reached the end life it was supposed to, instead I had to scroll beyond that just to get the task to trigger.)
]]>
< ![CDATA[
True, I forgot about snapping!
Regarding issues, that’s another story. Barriers are a bit special and I must admit that I didn’t pay attention to the reached event in border cases.
Another solution is to use a small script on position changed event to manually compute when the displayed page change.
]]>
< ![CDATA[
excellent idea
]]>
< ![CDATA[
Something like this could work but need some tuning:
var d = LL.getCurrentDesktop();
var t = d.getTag();
var x = Math.floor(d.getPositionX() / d.getWidth());
var y = Math.floor(d.getPositionY() / d.getHeight());
if(t) {
var pos = JSON.parse(t);
var ox = pos.x;
var oy = pos.y;
if(x != ox || y != oy) {
// do something useful here
// display values alert(x+”x”+y);
d.setTag(JSON.stringify({“x”:x, “y”:y}));
}
} else {
d.setTag(JSON.stringify({“x”:x, “y”:y}));
}
]]>
< ![CDATA[
yikes I wouldn’t know what I was reading let alone tune it to work
]]>