moshi wrote:while i am not really looking for a workaround or "solution", this is an interesting observation.
so at least when the skin to apply the setting is the current skin, it works when no config parameter is used. personally, i don't think this is ideal.
While this behavior (that it works on the current skin with no config name supplied, while not working when the same config is specified) is probably a bit inconsistent, I'm not sure there is an easy change we can or should make.
The way bangs that end up impacting settings in Rainmeter.ini work is that the change is applied to the actual skin in running memory, in the code that actually controls the behavior. It isn't that the change is applied to Rainmeter.ini, and Rainmeter is constantly reading Rainmeter.ini to see how the skin should behave. Rainmeter.ini is only read when the skin is loaded or refreshed.
The change to the skin setting is then reflected out to Rainmeter.ini during the normal update cycle of the skin, or when the skin is refreshed, unloaded, or when Rainmeter is exited.
The way Rainmeter works today, it really can't apply a change to an unloaded skin, as the skin doesn't exist as far as the running code is concerned. The very first thing it asks when a bang references a "config" in a parameter is "is that skin running?". If the answer is "no", we are done. There is no such skin to make the change to.
It should not be misunderstood that using !KeepOnScreen is the same as using !WriteKeyValue on Rainmeter.ini to set the "KeepOnScreen" option.
Now, having said that, the behavior with the "current config" vs "specific config" is probably not ideal indeed. It is internally logical, but is a bit non-intuitive.
The difference in logic kind of makes sense when you consider that OnCloseAction is reacting to the current running skin being asked to close. It is logical, and sort of the entire point, that the action would take place before the skin is unloaded. OnCloseAction is not however something that "causes" as skin to close, nor can it be expected to know up front if any other skin, specified in the "config" parameter, is actually running without asking... We can't design it so an OnCloseAction in ANY skin stops the unloading of ALL skins while we check to see if some action has been requested on some other skin.
Don't forget as well, that when you have a "config" as a parameter on a bang, Rainmeter has absolutely no way to know that the parameter refers to the skin the bang is in. It doesn't care. When you don't specify a "config", you are in effect saying "me", which is a given.
There may be some change we can make to get more consistent behavior, however I warn that any change is very unlikely to ever allow setting options on unloaded skins. The current behavior is very fundamental to how Rainmeter operates internally, and I would be opposed to just changing bangs like !KeepOnScreen or !Draggable to behave as if they were just a simple version of !WriteKeyValue with a !Refresh tacked on. That would actually be a massive change to the underlying logic of Rainmeter.