Page 1 of 3

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

Posted: June 26th, 2021, 10:04 pm
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

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

Posted: June 26th, 2021, 10:27 pm
by jsmorley
Let us look into it. Thanks for reporting!

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

Posted: June 26th, 2021, 10:38 pm
by Cariboudjan
Thank you!

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

Posted: June 27th, 2021, 12:40 am
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:

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

Posted: June 27th, 2021, 1:19 am
by Cariboudjan
Thought of that looking at the change notes, but removing the !Delay does not stop the error.

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

Posted: June 27th, 2021, 1:39 am
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.

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

Posted: June 27th, 2021, 4:31 am
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.

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

Posted: June 27th, 2021, 4:33 am
by Cariboudjan
Same result with [#CURRENTSECTION#] and [TopReserve]

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

Posted: June 27th, 2021, 5:24 am
by Brian
Can you try this version?

Edit: Removed link

-Brian

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

Posted: June 27th, 2021, 5:28 am
by Cariboudjan
It works! :rosegift: :rosegift: :rosegift: