vtray exported variables Thread last updated on 2004-02-23 22:30:24

Posted by member 119842 on 2004-02-23 02:44:17

How do I access vtray's exported variables, such as $vtrayCurrentWidth$? In vtray-1.60 readme it says that:

"Note that you will need to define dummy variables if you include these in scripts/rc files, since when LiteStep reads these files VTray has not yet added them, causing LS to think the variables are undefined."

So, what must I do? How do I set these "dummy variables"? Is this feature also available in systray2-2.0?

Posted by member 5669 on 2004-02-23 03:57:34 link

hmm i would just open up an included variable filr (like themevars.rc) and make some themebars like VTrayCurrentWidth, but not set them to anything. just define them initially and litestep should play nicely with the variable.

Posted by member 2112 on 2004-02-23 06:03:52 link

Yeah, just put
VTrayCurrentWidth 0
somewhere before it's used.

Posted by member 119842 on 2004-02-23 11:55:45 link

thanks for the tips. that's exactly what I tried before: to set a "VTrayCurrentWidth 0" in themevars.rc, but it didn't work. I tried again, and I set it in another include-file ("variables.rc"), but got no response from vtray's current width.

This is how I'm testing it:
TaskbarWidth $ResolutionX-VTrayCurrentWidth$
Result: it occupies the whole screen.

I've already set VTrayWidth to both autosize or a fixed size, or didn't write anything at all (default).

What am I missing? Any other idea?

Posted by member 7 on 2004-02-23 18:46:22 link

That's because at the time TaskbarWidth is read, VTrayCurrentWidth is probably still 0. You'll have to tell taskbar3 to reread its settings. For that specific scenario you don't need any exported variables by the way. Just use OnAdd/OnDel and !taskbargrow/-shrink.

Posted by member 119842 on 2004-02-23 19:46:35 link

Yes, ilmcuts, you were absolutely right. Thank you for the help. I read the Vtray's readme thoroughly and what I was missing was:
"VTrayCheckOnCommands True"

I thought it much easier to auto-resize the taskbar with the exported variables, like this:
VTrayOnAdd !TaskBarSize $ResolutionX-VTrayCurrentWidth$

I don't know if that's an elegant solution, though. I confess I couldn't get the !taskbargrow/shrink to resize with the proper width (I couldn't calculate the correct number).

Thank you, man.

Edit: are these features also available in Systray2?

Posted by member 119842 on 2004-02-23 22:30:24 link

Hey, nevermind my question. I found an updated help file on systray2. The link was unavailable before.

http://www.flatface.net/~namaide/lsdocs/systray.html

I switched back to systray2 because it gets along better with my winamp on tray.