I TestRc (NoMatch) Exec exec scite .fvwm/.fvwm2rc[/code]
It seems that when scite is already opened the “raise” part is ignored.
in man fvwm i found this example:
AddToFunc ToggleXterm
+ I Any (my_xtermwindow) Close
+ I TestRc (NoMatch) Exec xterm -T my_xtermwindow
It’is similar to what i want but doesn’t work. The “Close” command is ignored. (btw with xterm the right option is “-name” and not “-T”)
Where is the error?
[color=red]Edited by theBlackDragon:
–> Moved from Basic questions[/color]
I TestRc (NoMatch) Exec xterm -T my_xtermwindow[/code]
Any is executed in the context of the root window rather than what the condition matches on. You could also use the “next” or “prev” functions.
It does, and there’s perfectly valid reasons why you should want this in preference over ‘All’. It’s usually not appropriate to hit all windows with the given condition — and changing its running context is but a trivial matter.
If you don’t want to hit all windows then like I said, use the ‘next’ function. I was just pointing out the reason it wasn’t doing as he expected. I would have thought that the whole reason for writing this function was so that there would only be one instance of scite editing the file at the same time, in that case next/all would do about the same thing.
As for the condition, you can match the name exactly with (feel free to correct me ) (“.fvwm2rc - SciTE”|“.fvwm2rc * SciTE”). If matching by class, then to prevent this from interfering with other instances of scite, you could specify the class when loading scite with “scite --class=scitefvwm ~/.fvwm/.fvwm2rc”.
After doing everything the URL says, it still doesn’t work (not that it’s not good information).
How? If he knew this, he wouldn’t be asking what’s wrong.
DestroyFunc somefunc
AddToFunc somefunc
+ I None (sometitle) Exec exec scite --options
+ I TestRc (NoMatch) Next (sometitle) FlipFocus
Assuming that was the title, then yes. :) Is it still a good thing? Not really. Your idea of specifying a unique class name is much better. That’s probably the only thing going for Scite at the moment. :P