Using evars ? Thread last updated on 2003-03-26 02:15:36

Posted by member 2160 on 2003-02-24 07:58:37

HI I have w2k and latest indiestep build. And in changes there is note about sytry2 wariables
""""
- Changed [systray2 / Vendicator / 2002-09-12]
- Removed internal icons counter and using a function check instead for !bang commands
- Exported the following evars:
$SystrayCurrentIcons$, $SystrayCurrentX$, $SystrayCurrentY$, $SystrayCurrentHeight$, $SystrayCurrentWidth$
- Fixed update check to only use the title and not icon change, will allow for
hiding of zonealarm for instance
- Jesus_mjjg's fix temporarily disabled until the reason why systray also sets
it self above all windows is determined
""""
and If I try to use it like this

SystrayWidth 0
SystrayHidden false
SystrayAlwaysOnTop true
SystrayAutoSize true
SystrayDirection left
SystrayIconSize 16
SystrayX -$SystrayCurrentWidth$

I get uninitialized variable error

Hod do you use this new wariables that are available i indiestep?
since
TaskBarWidth $ResolutionX-278$
this works OK

Thanks

Posted by member 333 on 2003-02-24 08:12:07 link

well, it IS initialised. as it refers to the current width of the systray, it needs a current width, which isn't set in your step.rc. You need to set a width, and then $SystrayCurrentWidth$ will refer to that "later" afaik.

Posted by member 2160 on 2003-02-24 08:19:43 link

But I have
SystrayWidth 0

Posted by member 5406 on 2003-02-24 09:25:39 link

my guess is, that on load of step.rc SystrayCurrentWidth isn't set (it is for use in scripts etc. I guess). I don't think it will work, as you wan't it to either (if you want the systray to automaticly move according to it's width) because the SystrayX is only read when you run step.rc which is only at !re* and it doesn't change dynamicly. What you want to do is (as a conclusion to an earlier thread) to set SystrayX -64. This will do the job (you don't have to set systraywidth) and the systray will automaticly be snapped to the right edge of yout screen.

Posted by member 99 on 2003-02-24 13:03:12 link

The Current vars only work if you can delay the $$, either by executing it from lsxcommand, or using some other module to insert the $s later before executing.

In any case, SystrayX is a static value, it is evaluated once at startup. SystrayAutoSize/SystrayDirection left should automatically change the x position tho.

Posted by member 2160 on 2003-02-24 14:18:45 link

Actually I have problem with auto growing shrinking Taskbar systry combination. And I managed to get it work when I load litestep at startup and also when later I make !Recycle it works ok. But sometimes if some game or I change resolution it wont work. So somebody told me that I should put in step.rc about desktop this DesktopOnDisplayChange !refresh (not !recaycle since it can crash latestp) But !refresh don't work properly (I am using latest indie and taskbar3) . Taskbar and systry cant position itself right after !refresh, either I get taskbar too long (since it looks like !refresh don't call SysTrayOnAdd !TaskbarShrink 17 0) and systry out of the screen or I managed to get systry properly in top right corner but Cant get taskbar small enough so it should be right next to systry) This is why I needed this $SystrayCurrentWidth$ so I can get taskbar something like this TaskBarWidth $ResolutionX-(278+$SystrayCurrentWidth$)$ and I was hoping that this will solve my problem but I cant have this $SystrayCurrentWidth$ in my step.rc (or don't now how to do it). So maybe if somebody have some other solution to my problem I it would be great. (Also I have weary minimalist litestep configuration only basic modules task popup desktop systry and I would like to keep it this way :) - for rest I am using powerpro)

Posted by member 602 on 2003-03-25 13:59:56 link

I found that you can't write an evar insida another evar, only integers. So put it something like this instead:
TaskbarWidth $ResolutionX-278$-$SystrayCurrentWidth$
This works perfectly for me. About the problem with refresh, I have that to and I agree with you on the cause, so thats out of our hands.

Posted by member 7 on 2003-03-26 02:15:36 link

Milk: which build? Afaik it should be perfectly possible to write $SystrayWidth-SystrayX$ but then again I never actually tried that :p