Page 1 of 1

Mouse Action Group issue

Posted: June 18th, 2018, 3:54 pm
by balala
A few days ago, I started to work with the newly added !ToggleMouseAction / !DisableMouseAction / !EnableMouseAction bangs. Worked perfectly, according to what the help says about them.
A bit later I also wanted to try out the !ToggleMouseActionGroup / !DisableMouseActionGroup / !EnableMouseActionGroup bangs. None of them worked. I read the documentation, but had no luck, couldn't get them to work.
Finally I discovered the cause: these bangs, despite of what the help says, require the parameters in revers order. The order of the parameters have to be:
  • Meter, MouseAction(s) for the bangs related to a single meter
  • MouseAction(s), Group for bangs related to a group.
Eg this doesn't work: [!ToggleMouseActionGroup Buttons "LeftMouseUpAction"], but this does: [!ToggleMouseActionGroup "LeftMouseUpAction" Buttons]. The same way, the [!ToggleMouseAction Meter1 "LeftMouseUpAction"] bangs does work (Meter1 is a meter belonging to the Buttons group).
Looks extremely weird to have a such difference between the same bangs related to groups, against those related to one meter. Would be good if this would be fixed, but if it can't be, at least the documentation should have to be.
Thanks.

Re: Mouse Action Group issue

Posted: June 18th, 2018, 3:58 pm
by jsmorley
We will look into it. I'd rather "fix" it now, before they start being used and we end up with a backwards compatibly issue, but we will see.

Re: Mouse Action Group issue

Posted: June 18th, 2018, 4:00 pm
by balala
jsmorley wrote:We will look into it. I'd rather "fix" it now, before they start being used and we end up with a backwards compatibly issue, but we will see.
Ok, please do take a look.

Re: Mouse Action Group issue

Posted: June 18th, 2018, 4:39 pm
by Brian
balala wrote:A bit later I also wanted to try out the !ToggleMouseActionGroup / !DisableMouseActionGroup / !EnableMouseActionGroup bangs. None of them worked. I read the documentation, but had no luck, couldn't get them to work.
The problem was when we first did the docs, the parameters in the header section and examples were out of order. They had the "group" parameter before the "mouse actions" parameter. I went through and changed the "parameters" (in the header of the docs), and forgot to change the examples. This will be fixed shortly.

balala wrote:Looks extremely weird to have a such difference between the same bangs related to groups, against those related to one meter. Would be good if this would be fixed, but if it can't be, at least the documentation should have to be.
Yes, the order of the parameters is correct. Most group bangs do not take any other parameters, but for the ones that do, the settings comes before the group parameter.
See these for examples:
https://docs.rainmeter.net/manual-beta/bangs/#FadeDurationGroup
https://docs.rainmeter.net/manual-beta/bangs/#SetTransparencyGroup
And there are several more.

-Brian

Re: Mouse Action Group issue

Posted: June 18th, 2018, 5:15 pm
by balala
Brian wrote:The problem was when we first did the docs, the parameters in the header section and examples were out of order. They had the "group" parameter before the "mouse actions" parameter. I went through and changed the "parameters" (in the header of the docs), and forgot to change the examples. This will be fixed shortly.
Ok, I see it has been fixed. Thanks.
Brian wrote:Yes, the order of the parameters is correct. Most group bangs do not take any other parameters, but for the ones that do, the settings comes before the group parameter.
See these for examples:
https://docs.rainmeter.net/manual-beta/bangs/#FadeDurationGroup
https://docs.rainmeter.net/manual-beta/bangs/#SetTransparencyGroup
And there are several more.
Yes, but for example the !SetOptionGroup requires as first parameter, the name of the group (instead of the name of the section, needed by the !SetOption bang). That's why I found weird this order of the parameters. But finally I think it is less important their order, just the help to be in accord with the reality.
Now it is. Thankis again.

Re: Mouse Action Group issue

Posted: June 18th, 2018, 5:31 pm
by Brian
balala wrote:Yes, but for example the !SetOptionGroup requires as first parameter, the name of the group (instead of the name of the section, needed by the !SetOption bang). That's why I found weird this order of the parameters.
Yeah, you are right, there are a few inconsistencies with "order".
SetOptionGroup does use the Group first, while SetVariableGroup does it last.

We should have taken better care to get things more consistent.

balala wrote:But finally I think it is less important their order, just the help to be in accord with the reality.
Now it is. Thankis again.
Yeah, as long as we document, we should be covered. Thank you for finding the errors with the examples.

-Brian

Re: Mouse Action Group issue

Posted: June 18th, 2018, 5:53 pm
by balala
Brian wrote:We should have taken better care to get things more consistent.
Yep, I think now these have to be kept this way. Just because of the backward compatibility.