Help with evars and hovercurrenttask Thread last updated on 2006-04-24 15:09:45

Posted by member 134680 on 2006-04-24 01:04:37

Hey, im trying to make an xlabel display the title of the current hovered task. Xtaskbar and Xlabel will do it, but the instructions on how to do it assume i already know how to do it (if that makes sense?)
Little help please!
-Ash

Posted by member 212670 on 2006-04-24 01:25:44 link

I think what you're after is this:
Line 1: xTaskbarHoverTask
Line 2: LabelText "[if(notempty(exportedevar('xTaskbarHoverTask')))] [exportedevar('xTaskbarHoverTask')] [else]SomeOtherText[endif]"

The "xTaskbarHoverTask" by itself is necessary - it creates a dummy var at startup, so there's no error before a real var exists. The "SomeOtherText" is what is displayed when there isn't a task hovered.

Posted by member 134680 on 2006-04-24 01:34:19 link

well, that looks like what i want, but im coding it like this:
xtaskbaronenter !ParseEvars !labelsettext backpanel %#xTaskbarhovertask%#

but with the above i cant get it to display anything...

Posted by member 134680 on 2006-04-24 01:36:41 link

hmm, i copy pasted your method, but it lags a little... is that right or did i do something wrong?

Posted by member 212670 on 2006-04-24 01:47:52 link

It does lag a bit, meaning, the label won't update instantly. You might have to play with the updateinterval options for xlabel, or xtaskbar... or was it updatealways in xlabel... I forget. You'll have to experiment.

(and about the xtaskbaronenter method - I think i remember trying that when I was working this out a while ago, and I also found that wouldn't work. I'm assuming it's because the onenter is fired before the evar is available/read.)

Posted by member 280260 on 2006-04-24 15:09:45 link

Look at agua -> bar.rc. I do the same thing.