It is currently March 28th, 2024, 4:49 pm

Mouse Action Group issue

Report bugs with the Rainmeter application and suggest features.
Post Reply
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Mouse Action Group issue

Post 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.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Mouse Action Group issue

Post 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.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Mouse Action Group issue

Post 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.
User avatar
Brian
Developer
Posts: 2673
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Mouse Action Group issue

Post 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
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Mouse Action Group issue

Post 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.
User avatar
Brian
Developer
Posts: 2673
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Mouse Action Group issue

Post 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
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Mouse Action Group issue

Post 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.
Post Reply