It is currently November 30th, 2022, 3:45 am

Weird BEhavior - Or so it seems

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1091
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Weird BEhavior - Or so it seems

Post by CodeCode »

I have a bar that convets metric to farenheir and the reverse.

It works but there is something wrong. Sometimes the British/Metric button needs to be clicked from then back to the desired system.

Everything seems to work after that. I am hoiping someone knows a way to remove that unnecessary mouse action.

Here is the file:
BitMet Converter_0.1.rmskin
Thanks for any help.

Cheers.
You do not have the required permissions to view the files attached to this post.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 14744
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weird BEhavior - Or so it seems

Post by balala »

Sorry, but me at least can't even figure out what the skin should do. If I click the first button (there is written Enter), I can enter a numerical value from the keyboard. When I hit Enter, nothing is done, nothing happens. If I click the second button (Metric or British), the Metric and / or British string switches, but nothing else is changing. Finally, I can click the last button (Output) as well, but such in a case, I get the last string (Output) replaced by a 0 and this is all. Nothing else.
So a description of what should we do or expect to happen would be nice...
User avatar
CodeCode
Posts: 1091
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Weird BEhavior - Or so it seems

Post by CodeCode »

Ok everything actually does work, but with bugs. clicking on the box allows you to enter a value for several measurement systems - scrolling the top box allows you to choose which conversion you want. Then click the last button a numeric value equivalent to the conversion the metric or British button is to toggle what you want to convert to.

But sometimes the metric and British button needs to be toggled twice one then back to the original system then finally clicking the last button should reveal your converted measurement.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1091
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Weird BEhavior - Or so it seems

Post by CodeCode »

In hindsight I would have known more details would have helped.

But I seem to found a solution - buy putting magic quotes around the conversions equations.

I think it is necessary when multiple outcomes use the same meter for display.

I chime back in if I find ANY NEW bugs. sry caps. :oops:

lika dis:

Code: Select all

[MeasureOfUnits]
Measure=Calc
Formula=0
IfCondition=(#Mode# = 1) && (#UnitSystem# = 1)
IfTrueAction=[!SetOption MeasureOfUnits Formula """#Var# * 0.914"""][!Update]
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1091
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Weird BEhavior - Or so it seems

Post by CodeCode »

looks like the magic quotes dont really work consistently.

If anyone has a solution please post it. Thanks.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 14744
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weird BEhavior - Or so it seems

Post by balala »

CodeCode wrote: September 13th, 2022, 4:46 pm But I seem to found a solution - buy putting magic quotes around the conversions equations.

I think it is necessary when multiple outcomes use the same meter for display.
To be honest I don't see this could help. Doesn't for me (and yep, I saw you posted the same thing in meantime).
However what am I not sure about is what do you mean by "multiple outcomes use the same meter for display". What do you mean?
CodeCode wrote: September 13th, 2022, 4:46 pm I chime back in if I find ANY NEW bugs. sry caps. :oops:
Yep, I think there is one. Namely in the IfTrueAction6 option of the [MeasureOfUnits] measure. This is what you have used there:
IfTrueAction6=[!SetOption MeasureOfUnits Formula "#*Var*# -32 * .5556"][!Update]. But note that Rainmeter is not happy at all when the integer part of a number is 0 and this is not explicitly specified. So add the not-used zero: IfTrueAction6=[!SetOption MeasureOfUnits Formula "#*Var*# -32 * 0.5556"][!Update]
User avatar
Judian81
Posts: 169
Joined: May 6th, 2021, 2:57 pm

Re: Weird BEhavior - Or so it seems

Post by Judian81 »

these changes works for me.

Code: Select all

[MeterInput]
Meter=String
X=55
Y=54
W=98
H=24
FontSize=15
FontColor=#IconTint#
SolidColor=15,15,15
AntiAlias=1
FontFace=Tele-Marines
;-----
Text=#Var#
DynamicVariables=1
;-----

[MeasureInput]
Measure=Plugin
Plugin=InputText
X=55
Y=54
W=98
H=23
FontSize=15
FontColor=#EdgeColor#
SolidColor=15,15,15
FontFace=Tele-Marines
;------
DefaultValue=#Var#
;------
InputNumber=1
AntiAlias=1
InputLimit=6
Command1=[!SetVariable Var "$UserInput$"][!WriteKeyValue Variables Var "[#var]" "#@#_ExtendPrefs.inc"][!Update]
windows 10
User avatar
CodeCode
Posts: 1091
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Weird BEhavior - Or so it seems

Post by CodeCode »

balala wrote: September 13th, 2022, 7:07 pm To be honest I don't see this could help. Doesn't for me (and yep, I saw you posted the same thing in meantime).
However what am I not sure about is what do you mean by "multiple outcomes use the same meter for display". What do you mean?
I mean that for each system the output should reflecr the correct conversion, using the same text meter.
balala wrote: September 13th, 2022, 7:07 pm Yep, I think there is one. Namely in the IfTrueAction6 option of the [MeasureOfUnits] measure. This is what you have used there:
IfTrueAction6=[!SetOption MeasureOfUnits Formula "#*Var*# -32 * .5556"][!Update]. But note that Rainmeter is not happy at all when the integer part of a number is 0 and this is not explicitly specified. So add the not-used zero: IfTrueAction6=[!SetOption MeasureOfUnits Formula "#*Var*# -32 * 0.5556"][!Update]
Cool. That was one of the bugs - and I do actually 9or should) know that decimal fractions of 1 cannot have a zero.

I continue to errors sometimes and they are inconsistent. sometimes the value is correct - testing by 1 for each system. This is driving me more crazy than I already am. lol
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 14744
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weird BEhavior - Or so it seems

Post by balala »

CodeCode wrote: September 13th, 2022, 8:21 pm I continue to errors sometimes and they are inconsistent. sometimes the value is correct - testing by 1 for each system. This is driving me more crazy than I already am. lol
Could you please trying to described when exactly the errors are occurring? Because I can't find any (however didn't test extremely deeply). I mean you should describe which conversion do you choose, what do you enter and so on.
User avatar
CodeCode
Posts: 1091
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Weird BEhavior - Or so it seems

Post by CodeCode »

balala wrote: September 13th, 2022, 8:28 pm Could you please trying to described when exactly the errors are occurring? Because I can't find any (however didn't test extremely deeply). I mean you should describe which conversion do you choose, what do you enter and so on.
Funny you should ask, I was just going to post this part of theconverter:

Code: Select all

IfCondition5=(#Mode# = 1) && (#UnitSystem# = 3)
IfTrueAction5=[!SetOption MeasureOfUnits Formula "((#Var# * 1.8) + 32)"][!Update]
IfCondition6=(#Mode# = 0) && (#UnitSystem# = 3)
IfTrueAction6=[!SetOption MeasureOfUnits Formula "((#Var# -32) / 1.8)"][!Update]
it seems the conversion for C to F work ok - but there seems to be an issue with negative numbers - they dont seem to be allowed in the Inputtext plugin. for example when I chech celcuius 0 it comes up 32 f. Looks good. But, when i try to convert 0 f to celcius it just sits at zero.

I dont want to jinx it, but other than that, everything seems to be working as hoped.

thanks guys for helping out.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.