Posted by member 71746 on 2003-11-15 01:41:09 link

Smurth, the problem is specifically that systray2 is too efficient - it loads itself completely before moving on to the next instruction (ie, to load ls box and get hooked). That means that by the time...
*script start !skinboxexec systraybox !systrayhook .none {@ih}
...is called, ...
*script start !netreloadmodule $systray$
...has completely finished, and all the OnAdd's and OnDel's have run their course.


RabidCow, what's with the %{\1} and \2?
and is !SetBoxSizeFromStoredValue just implying a script I would create to set the box size/position?
Your proposed solution inspires an easier option to achieve the same means.. The problem is that the OnAdd/Del's are being executed before the Hooking occurs, so I could use something like

SystrayOnAdd !IconAdded
SystrayOnDel !IconDeleted

*script bang !IconAdded
*script exec !varAdd trayheight 20
*script exec !varAdd traypos -20
; add the exec's to move and resize the lsbox
*script ~bang

*script bang !IconDeleted
*script exec !varAdd trayheight -20
*script exec !varAdd traypos 20
; add the exec's to move and resize the lsbox
*script ~bang

Then reference an bang like !InitTheme with *Script start, and have it contain:

*Script exec !NetReloadModule systray2-2.0.1
*Script exec !LsBoxMoveBox -32 %{traypos}
*Script exec !LsBoxResize 32 %{traywidth}

That way any time an icon is added after the initial startup/recycle sequence, the box hears the commands to be resized and moved, but even before lsbox is loaded, when the initial startup/recycle sequence happens and the OnAdd/OnDel's are triggered, the variable is set, and the init script then resizes/moves the lsbox to the size/position it's supposed to be. Peasants rejoice, velvet curtains part, champagne falls from the heavens. (Not in bottles..)

I'll try it in the morning, glad I got it written down ;)