It is currently July 27th, 2021, 2:16 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

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

Post by Cariboudjan »

Droptop not compatible with the most recent update. Causes below error. Cannot send an argument when executing the launch command for an executable. Does not happen in the previous beta update.

The addon used takes a string value and converts it into an integer. The command when executed is supposed to send the value in quotes as a string, but it sends the value as an integer, which my suspicion is what causes the exception.

Placing a fixed integer in quotes works normally (eg. "42"), but as a formula (eg. "[#CURRENTSECTION#]") does not work, even if the number is exactly the same.

Green highlight = Execute addon command with argument
123.png
321.png

Code: Select all

[MeasureRegistry]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Control Panel\Desktop\WindowMetrics
RegValue=AppliedDPI
UpdateDivider=-1
Group=WorkareaMeasures

[DPIRescaleValue]
Measure=Calc
Formula=((ROUND(([MeasureRegistry]/100)/0.25))*0.25)
IfAboveValue=0
IfAboveAction=[!WriteKeyValue Variables DPIRescaleValue [#CURRENTSECTION#] "#@#GlobalVar\UserSettings.inc"][!SetVariableGroup DPIRescaleValue [#CURRENTSECTION#] "DroptopSuite"]
Substitute="":"1"
DynamicVariables=1
UpdateDivider=-1

[SetTaskbarSize]
Measure=Calc
Formula=((#WORKAREAHEIGHT#-#WORKAREAWIDTH#)+(#WORKAREAX#-#WORKAREAY#))
OnChangeAction=[!Move ((#Xnum#>0?0:#WORKAREAX#)+(([#SCREENAREAWIDTH[#MonitorNum]]+([#SCREENAREAWIDTH[#MonitorNum]]*([DPIRescaleValue]*(#DPIRescaleOFF#=1?0:1))))*#Xnum#)) (#AlwaysShowSkin#=1?0:(#Xnum#>0?0:#WORKAREAY#)) "Droptop\DropdownBar"][!UpdateMeter * "Droptop\DropdownBar][!Redraw "Droptop\DropdownBar"]
DynamicVariables=1
Group=WorkareaMeasures

[TopReserve]
Measure=Calc
Formula=ROUND((#TopHeight#+#TopReservationOffset#)*(#DPIRescaleOFF#=1?[DPIRescaleValue]:1))
IfCondition=(#AlwaysShowSkin#=1)
IfTrueAction=[!ActivateConfig "Droptop\DropdownBar" "DropdownBar.ini"]["#SKINSPATH#Droptop Folders\Other files\Addons\Droptop Rainmeter.exe" "[#CURRENTSECTION#]"][!Delay 2000][!Show "Droptop\DropdownBar"]["#SKINSPATH#Droptop Folders\Other files\Addons\Droptop Rainmeter.exe" "[#CURRENTSECTION#]"]
IfFalseAction=[!ActivateConfig "Droptop\DropdownBar" "DropdownBar.ini"][!Show "Droptop\DropdownBar"]
IfConditionMode=1
DynamicVariables=1
UpdateDivider=-1
Group=WorkareaMeasures
You do not have the required permissions to view the files attached to this post.
Last edited by Cariboudjan on June 27th, 2021, 12:04 am, edited 5 times in total.
User avatar
jsmorley
Developer
Posts: 21973
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

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

Post by jsmorley »

Let us look into it. Thanks for reporting!
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 »

Thank you!
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 »

Cariboudjan wrote: June 26th, 2021, 10:04 pm Droptop not compatible with the most recent update. Causes below error. Cannot send an argument when executing the launch command for an executable. Does not happen in the previous beta update.

Green highlight = Execute addon command with argument

Code: Select all

...
IfTrueAction=[!ActivateConfig "Droptop\DropdownBar" "DropdownBar.ini"]["#SKINSPATH#Droptop Folders\Other files\Addons\Droptop Rainmeter.exe" "[#CURRENTSECTION#]"][!Delay 2000][!Show "Droptop\DropdownBar"]["#SKINSPATH#Droptop Folders\Other files\Addons\Droptop Rainmeter.exe" "[#CURRENTSECTION#]"]
...
The most recent beta fixed an incorrect behavior of the [!Delay ...] bang (see here and here), and I see a [!Delay 2000] in the highlighted option. Maybe the skin was counting on the previous (yet wrong) Rainmeter behavior and this is causing the issue? Though, if I think about it, there are no "bang replacement variables" as Brian called them here...

What I'm saying is that maybe the execution order is changed in this skin due to the last beta, if the skin was exploiting that previous behavior. Just guessing and trying to help here - I might got this wrong, but it is a possibility. :confused:
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 »

Thought of that looking at the change notes, but removing the !Delay does not stop the error.
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 »

Cariboudjan wrote: June 27th, 2021, 1:19 am Thought of that looking at the change notes, but removing the !Delay does not stop the error.
The !Delay cerrtainly has a purpose there (I know because I used these methods as well to make sure some actions have time to properly finish before starting others), so I wasn't talking about removing, but rather changing its position in that option, say, to the end. Unfortunately I don't know precisely what those things do and I'm not familiar with the skin, so if I'm wrong and there's another culprit entirely, hopefully you'll forgive me for proposing futile attempts.

You may also place some [!Log ...]-s in various places there while loading the skin in the previous Rainmeter beta, in order to see exactly what was the expected order of operations in the skin then, or even compare if those orders match between Rainmeter versions by using [!Log ...]-s in the same places in the last beta.

Another possibility is that of the "special treatment" of !Delay conflicting with the "special treatment" of #CURRENTSECTION# in 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 »

I can suppose that "[#CURRENTSECTION#]" could be a culprit in the TopReserve. You are technically using here nested variables, and Rainmeter mostly probably turns it "[#CURRENTSECTION#]" into "TopReserve#". Try logging what your "[#CURRENTSECTION#]" returns in the last beta it worked for you and in the current one.
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 »

Same result with [#CURRENTSECTION#] and [TopReserve]
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 »

Can you try this version?

Edit: Removed link

-Brian
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 »

It works! :rosegift: :rosegift: :rosegift: