Label 1.99 and xTaskbar 1.2.4 Thread last updated on 2007-06-27 17:40:46

Posted by member 375890 on 2007-06-27 03:03:15

So I'm modifying the theme TPlus to my liking and I'm having some trouble with the compatibility of two modules. I am setting up a task switcher with xTaskbar 1.2.4 using only icons (mac style...no text) but I want to pass the title of the window that my mouse is hovering over to a text box, made with Label 1.99. the code is as follows. mainHoverTask (this taskbar is titled "main") is supposed to be a global variable as per the docs so I am trying to pass it on to the label (I titled it "lblmain") in the syntax that lets it update dynamically. The code I am using to pull the text off the label is :

lblmainText "[$mainHoverTask$]"

It works fine without the brackets but doesn't update dynamically. (whatever I say mainHoverTask equals upon creation will not change)... Any suggestions?

Posted by member 375890 on 2007-06-27 03:10:40 link

so I'm not asking anyone to debug my code, but if it helps, the entire code for the taskbar and the label is as follows:

; Task Switcher

*xTaskbar main

;size
mainX 450
mainY 1
mainWidth $resolutionx-mainx-100$
mainHeight 22

;display
mainHideIfEmpty false
mainAlwaysOnTop true
mainFlashInterval 800
;mainLoadInBox
;mainDisplay "active+minimized" ;probably dont uncomment
mainFocusOnEnter false
mainUseBigIcon true
mainShowIcon true
mainShowText false
mainShowTooltip true
mainShowHoverState true
;mainButtonXSpacing
mainLayout .horizontal
mainWrapCount $(resolutionx-mainx-100)/16$
mainSort .classname

;background settings
mainImage systray2.png
mainImageLeftEdge 14
mainImageRightEdge 14
mainImageTopEdge 1
mainImaeBottomEdge 1
mainTransparencyMode true

;options
mainOnLeftClickButton .select
mainOnRightClickButton .menu
mainOnMiddleClickButton .close

mainHoverTask "temp"

;*LsBoxCreate $ConfigDir$taskswitcher.box

;-------------------------------
;label for Task Switcher

Labels lblmain
lblmainText "$mainHoverTask$"
lblmainX 400
lblmainY 40
lblmainHeight 22
lblmainWidth 150

;display settings
lblmainAlwaysOnTop true
lblmainImage systray2.png
lblmainImageLeftEdge 14
lblmainImageRightEdge 14
lblmainImageTopEdge 1
lblmainImageBottonEdge 1
lblmainTrueTransparency true
lblmainTransparent true
lblmainFont Tahoma
lblmainFontHeight 12

Posted by member 248213 on 2007-06-27 05:02:41 link

Use xlabel and you can have dynamic evars ala: %#mainhovertask%#

from the docs:
"To use $evars$ in Bangs, which contain the "CURRENT" value, use the escape code %# and prefix the "!ParseEvars" Bang!
$xTaskbarcurrentwidth$ becomes %#xTaskbarcurrentwidth%# and so on ..."

So $mainHoverTask$ becomes %#mainHoverTask%# if you want it to be dynamic.

Posted by member 212670 on 2007-06-27 08:44:58 link

He doesn't want to use it in a bang. He wants to use it as an [exportedevar].

Example of LabelNameText:

"[if(notempty(exportedevar('xTaskbarHoverTask')))] [exportedevar('xTaskbarHoverTask')] [else]SomeOtherText[endif]"

reference

That will require xLabel, as you said, though.

Posted by member 375890 on 2007-06-27 14:02:13 link

Thanks a lot...worked great!

Posted by member 212670 on 2007-06-27 17:40:46 link

Np, glad to help.