It is currently July 27th, 2021, 2:35 pm

[BUG] Can't send a number from a formula to an addon in the most recent beta update

Report bugs with the Rainmeter application and suggest features.
User avatar
Cariboudjan
Posts: 176
Joined: May 12th, 2019, 8:55 am

Re: [BUG] Can't send a number from a formula to an addon in the most recent beta update

Post by Cariboudjan »

Brian, as an FYI, seems the version you provided has another bug that the previous version did not have.

Bangs executed as a nested variable do not execute.

See highlight in image for nested bang.
123.png
You do not have the required permissions to view the files attached to this post.
User avatar
Brian
Developer
Posts: 2210
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [BUG] Can't send a number from a formula to an addon in the most recent beta update

Post by Brian »

Well dang. I just did a new beta release.

I will look into this.

-Brian
User avatar
Active Colors
Moderator
Posts: 807
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: [BUG] Can't send a number from a formula to an addon in the most recent beta update

Post by Active Colors »

Cariboudjan wrote: June 27th, 2021, 7:05 am Brian, as an FYI, seems the version you provided has another bug that the previous version did not have.

Bangs executed as a nested variable do not execute.

See highlight in image for nested bang.

123.png
1. Why do you use [#StartAction[#PresetColor]#ResetColor#] instead of [#StartAction[#PresetColor][#ResetColor]] ?

2. Check this test to see if any of the four variants are executed. This test initiates all the four executions in the current r3488 beta.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
OnRefreshAction=[#StartAction[#A1]#B1#][#StartAction[#A2]#B2#][#StartAction[#A3][#B3]][#StartAction[#A4][#B4]]

[Variables]
StartAction11=!Log "StartAction11 executed"
StartAction22=[!Log "StartAction22 executed"]
StartAction33=!Log "StartAction33 executed"
StartAction44=[!Log "StartAction44 executed"]

A1=1
B1=1

A2=2
B2=2

A3=3
B3=3

A4=4
B4=4

[Background]
Meter=Image
W=200
H=100
SolidColor=0,0,0,255
3.
Cariboudjan wrote: June 27th, 2021, 4:33 am Same result with [#CURRENTSECTION#] and [TopReserve]
Here I meant you would better using [#CURRENTSECTION]. The way you wrote [#CURRENTSECTION#] can confuse Rainmeter.
User avatar
Active Colors
Moderator
Posts: 807
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: [BUG] Can't send a number from a formula to an addon in the most recent beta update

Post by Active Colors »

Active Colors wrote: June 27th, 2021, 7:35 am 2. Check this test to see if any of the four variants are executed. This test initiates all the four executions in the current r3488 beta.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
OnRefreshAction=[#StartAction[#A1]#B1#][#StartAction[#A2]#B2#][#StartAction[#A3][#B3]][#StartAction[#A4][#B4]]

[Variables]
StartAction11=!Log "StartAction11 executed"
StartAction22=[!Log "StartAction22 executed"]
StartAction33=!Log "StartAction33 executed"
StartAction44=[!Log "StartAction44 executed"]

A1=1
B1=1

A2=2
B2=2

A3=3
B3=3

A4=4
B4=4

[Background]
Meter=Image
W=200
H=100
SolidColor=0,0,0,255
None of these are executed in the newest r3489 beta. Nice! :D
User avatar
Active Colors
Moderator
Posts: 807
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: [BUG] Can't send a number from a formula to an addon in the most recent beta update

Post by Active Colors »

Active Colors wrote: June 27th, 2021, 7:38 am None of these are executed in the newest r3489 beta. Nice! :D
MY BAD! Actually the bangs 2, 3, and 4 work! I just had to take out not working bang number 1 and test the rest of the bangs one by one before saying so.
User avatar
Active Colors
Moderator
Posts: 807
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: [BUG] Can't send a number from a formula to an addon in the most recent beta update

Post by Active Colors »

Active Colors wrote: June 27th, 2021, 7:50 am MY BAD! Actually the bangs 2, 3, and 4 work! I just had to take out not working bang number 1 and test the rest of the bangs one by one before saying so.
Hence, initial format [#StartAction[#PresetColor]#ResetColor#] will not work if the bang in the variable is not enclosed in the brackets as Cariboudjan have it in the original code. Enclosing the bang in brackets works:

Code: Select all

[Rainmeter]
OnRefreshAction=[#StartAction[#PresetColor]#ResetColor#]
[Variables]
StartAction00=[!Log "StartAction00 executed"]
PresetColor=0
ResetColor=0
However the nested variable in the original code is problematic. Following the nested rule it should look as [#StartAction[#PresetColor][#ResetColor]] as pointed out before. The correct format will launch the bang in the variable no matter whether there are enclosing brackets or not. Of course not enclosing bang in brackets will cause the problem if there is a chain on consecutive bangs. The final version should look as either:

Code: Select all

[Rainmeter]
OnRefreshAction=[#StartAction[#PresetColor][#ResetColor]]
[Variables]
StartAction00=!Log "StartAction00 executed"
PresetColor=0
ResetColor=0
or:

Code: Select all

[Rainmeter]
OnRefreshAction=[#StartAction[#PresetColor][#ResetColor]]
[Variables]
StartAction00=[!Log "StartAction00 executed"][<more bangs>]
PresetColor=0
ResetColor=0
User avatar
Brian
Developer
Posts: 2210
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [BUG] Can't send a number from a formula to an addon in the most recent beta update

Post by Brian »

Active Colors wrote: June 27th, 2021, 8:02 am 1. Why do you use [#StartAction[#PresetColor]#ResetColor#] instead of [#StartAction[#PresetColor][#ResetColor]] ?
There is no reason this should not work. Mixing regular variables and nested variables is not a problem unless syntax errors happen (which there is none here). These were parsed correctly for a quite a while, until the "bang replacement variables" issue with the !Delay bang.


We can't reasonably expect everyone to go back through their skins to fix issues like this.


That being said, Rainmeter 4.4 revision 3489 has been pulled until this issue is properly fixed. Hopefully in the next couple of days.

-Brian
User avatar
Yincognito
Rainmeter Sage
Posts: 3644
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [BUG] Can't send a number from a formula to an addon in the most recent beta update

Post by Yincognito »

Brian wrote: June 27th, 2021, 8:23 am There is no reason this should not work. Mixing regular variables and nested variables is not a problem unless syntax errors happen (which there is none here). These were parsed correctly for a quite a while, until the "bang replacement variables" issue with the !Delay bang.


We can't reasonably expect everyone to go back through their skins to fix issues like this.


That being said, Rainmeter 4.4 revision 3489 has been pulled until this issue is properly fixed. Hopefully in the next couple of days.

-Brian
Ouch! Hopefully you'll find a way to make both the !Delay thing and everything else that worked before (including in this skin) happen properly - fingers crossed. Sorry that the !Delay fix caused this, but I think you all agree that the previous incorrect behavior of !Delay in some circumstances had to be resolved...

Backward compatibility is sometimes tricky to achieve, it seems.
oZone
Posts: 143
Joined: May 14th, 2018, 4:46 pm

Re: [BUG] Can't send a number from a formula to an addon in the most recent beta update

Post by oZone »

Maybe related
I am using this in launcher. Right click works, left click not in the latest beta.

Code: Select all

[Rainmeter]
BackgroundMode=1
DynamicWindowSize=1
AccurateText=1
Update=-1

[Variables]
Launcher1-1-App=control /name Microsoft.ProgramsAndFeatures
Launcher1-1-Tip="Programs And Features"

[sTextStyle]
UpdateDivider=-1
MouseActionCursor=1
AntiAlias=1
FontSize=20
FontColor=200,200,200
FontWeight=700
StringEffect=Border
SolidColor=220,220,220

[sLauncherStd]
ToolTipText="Open [#[#CURRENTSECTION]-Tip]"
LeftMouseUpAction=[[#[#CURRENTSECTION]-App]]

[Launcher1-1]
Meter=String
MeterStyle=sTextStyle | sLauncherStd
Text=" Programs And Features"
RightMouseUpAction=[control /name Microsoft.ProgramsAndFeatures]
User avatar
Yincognito
Rainmeter Sage
Posts: 3644
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [BUG] Can't send a number from a formula to an addon in the most recent beta update

Post by Yincognito »

oZone wrote: June 27th, 2021, 8:32 pm Maybe related
I am using this in launcher. Right click works, left click not in the latest beta.
Well, this doesn't have any !Delay bang, so it isn't that. I guess the main issue is related to the "bang replacement variables" in general and the ones involving CURRENTSECTION in particular. If it's just that, I believe it has (and had) greater ramifications, like, say, using such escaped variables in formulas that may or may not contain inline Lua calls. In that case, solving this could have additional benefits in various other places, since we're at it.