On 11/05/2012 07:57 AM, Bastian wrote:
State is for conditional expressions.
We need more information about what you are trying to do.
More in detail:
Mouse 2 W 4 Function TagWindow 10
Mouse 2 R 4 Function PullTaggedWindows 10
DestroyFunc TagWindow
AddToFunc TagWindow
+ I Pick State $0 1
When you tag your window you can do other things to it. One useful tool
is WindowStyle. It will change the Style of the window in question. So
just like your TagWindow function picks a window to set to State 10, you
can use that to set the WindowStyle to change the border color (or do
other options) on that window.
So you could do something like this
AddToFunc TagWindow
+ I Pick
+ I TestRc (Error) Break
+ I State $0 1
+ I WindowStyle BorderColorSet foo, HilightBorderColorset bar
You can of course add other options/actions to that window you picked
(note the second line is just to stop the function if a window wasn't
sucessfuly picked). You might also prefer to use + I Pick (conditions)
and put some sane conditions so you don't accidently pick a window you
don't want to (like transient windows, pannels, etc)
If you have a way to toggle the state of the window (so you can turn off
State 10 in your case, you will have to do something similar and reverse
the colorset change on the border color)
jaimos