It is currently March 29th, 2024, 1:59 pm

Value change icon

Get help with creating, editing & fixing problems with skins
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Value change icon

Post by xenium »

balala wrote:Ok, here is the solution: replace the UpdateDivider=-1 option of the [MeasureTemp] measure with UpdateRate=-1. So simple...
Now it is working
Thank you very much

A last question

Now ,▲ and ▼ signs are kept until the [MeasureUpdate] value is changed again.
But if in the meantime refresh the skin, because the temperature value has not changed, ▲ and ▼ signs are no longer displayed again.
Is it possible that [MeasureTemp] ignores skin refreshing?
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Value change icon

Post by balala »

xenium wrote:Now ,▲ and ▼ signs are kept until the [MeasureUpdate] value is changed again.
But if in the meantime refresh the skin, because the temperature value has not changed, ▲ and ▼ signs are no longer displayed again.
Is it possible that [MeasureTemp] ignores skin refreshing?
Try to write the appropriate symbol into the [Variables] section, as the DirIcon variable:

Code: Select all

[MeasurePrev]
...
IfCondition=#PrevValue# > [MeasureTemp]
IfTrueAction=[!SetVariable DirIcon "▼"][!WriteKeyValue Variables DirIcon "▼"][!SetVariable PrevValue "[MeasureTemp]"][!WriteKeyValue Variables PrevValue "[MeasureTemp]"][!UpdateMeter *][!Redraw]
IfCondition2=#PrevValue# < [MeasureTemp]
IfTrueAction2=[!SetVariable DirIcon "▲"][!WriteKeyValue Variables DirIcon "▲"][!SetVariable PrevValue "[MeasureTemp]"][!WriteKeyValue Variables PrevValue "[MeasureTemp]"][!UpdateMeter *][!Redraw]
IfCondition3=#PrevValue# = [MeasureTemp]
IfTrueAction3=[!SetVariable DirIcon "▬"][!WriteKeyValue Variables DirIcon "▬"][!SetVariable PrevValue "[MeasureTemp]"][!WriteKeyValue Variables PrevValue "[MeasureTemp]"][!UpdateMeter *][!Redraw]
See the newly added !WriteKeyValue bangs, which every time the symbol is changing, write it as the DirIcon variable.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Value change icon

Post by xenium »

balala wrote:Try to write the appropriate symbol into the [Variables] section, as the DirIcon variable:

Code: Select all

[MeasurePrev]
...
IfCondition=#PrevValue# > [MeasureTemp]
IfTrueAction=[!SetVariable DirIcon "▼"][!WriteKeyValue Variables DirIcon "▼"][!SetVariable PrevValue "[MeasureTemp]"][!WriteKeyValue Variables PrevValue "[MeasureTemp]"][!UpdateMeter *][!Redraw]
IfCondition2=#PrevValue# < [MeasureTemp]
IfTrueAction2=[!SetVariable DirIcon "▲"][!WriteKeyValue Variables DirIcon "▲"][!SetVariable PrevValue "[MeasureTemp]"][!WriteKeyValue Variables PrevValue "[MeasureTemp]"][!UpdateMeter *][!Redraw]
IfCondition3=#PrevValue# = [MeasureTemp]
IfTrueAction3=[!SetVariable DirIcon "▬"][!WriteKeyValue Variables DirIcon "▬"][!SetVariable PrevValue "[MeasureTemp]"][!WriteKeyValue Variables PrevValue "[MeasureTemp]"][!UpdateMeter *][!Redraw]
See the newly added !WriteKeyValue bangs, which every time the symbol is changing, write it as the DirIcon variable.
Just like before, the symbols are not kept after refresh
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Value change icon

Post by PtitChat107 »

balala wrote:The package doesn't have a @Resources folder.
Exactly I did not want to use it but I think I found THE solution, just modify the 3 conditions like this:

Code: Select all

[!WriteKeyValue Variables PrevValueBitcoin "[measureBitcoin]" "/PrevVariables.inc"]
.
The recovered result seems to be updated in the .inc file so I guess I have nothing to do, you confirm me against that I can safely remove this part:

Code: Select all

[!SetOption meterValueBitcoin InlinePattern "^.* € (.)$"]
If I want to use this trick for other results ?
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Value change icon

Post by balala »

PtitChat107 wrote:you confirm me against that I can safely remove this part:

Code: Select all

[!SetOption meterValueBitcoin InlinePattern "^.* € (.)$"]
If I want to use this trick for other results ?
Yes, you can freely remove those bangs, but if you want to still use the inline setting on the [meterValueBitcoin] meter (to color appropriately the symbol), add the option directly to the [meterValueBitcoin] meter: InlinePattern=^.* € (.)$. You don't need to use those !SetOption bangs in the IfTrueAction options of the [MeasureBitcoinPrev] measure, because all three bangs are the same, nothing is modified from one IfTrueAction to the other, so the option can be set directly to the meter.
On the other hand, if you don't want to color the symbol any more, beside removing the [!SetOption meterValueBitcoin InlinePattern "^.* € (.)$"] bangs, also remove the [!SetOption meterValueBitcoin InlineSetting "Color | X,X,X,255"] bangs, too.
If you remove the InlinePattern=^.* € (.)$ bangs, without adding the appropriate option to the meter and don't remove the [!SetOption meterValueBitcoin InlineSetting "Color | X,X,X,255"] bangs, the whole string is colored accordingly to the colors set in the remained !SetOption bangs.

And one more: I'd replace the Text option of the [meterValueBitcoin] meter (Text=[measureBitcoin] € #DirIcon#) with Text=%1 € #DirIcon#. You have set the MeasureName=measureBitcoin option on the meter, which means that in the Text option you can refere the that measure, through the %1 symbol.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Value change icon

Post by balala »

xenium wrote:Just like before, the symbols are not kept after refresh
I tested the skin over day, but for me they are kept. After a refresh, the previously existing symbol appears.
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Value change icon

Post by PtitChat107 »

I still have two results to finish so that everything can work but I would like to have your opinion because I think there must be a problem of "cut" because of the separation of units :confused:
Last edited by PtitChat107 on July 13th, 2018, 9:41 am, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Value change icon

Post by balala »

PtitChat107 wrote:I still have two results to finish so that everything can work but I would like to have your opinion because I think there must be a problem of "cut" because of the separation of units :confused:
If you check the log, you'll see there are more errors. One of these errors is related to the fact that you've added substitutions to two measures, to have a separation between the digit of the thousands and the digit of the hundreds. Don't do this, because if you do, the measures which should have to use the values returned by these measure will fail.
So, remove the last parts of the Substitute options of the [measurePoleEmploiDoubs] and the [measurePoleEmploiNational] measures, leaving just these:

Code: Select all

[measurePoleEmploiDoubs]
...
Substitute="":"...","\n":"","\s":""
...

[measurePoleEmploiNational]
...
Substitute="":"...","\n":"","\s":""
...
Besides this, the [MeasureFacebook] also fails, because:
  • The used Facebook page doesn't exists, it seems (at least me couldn't find it).
  • Even if it would exists, Facebook requires a logon, but the WebParser measures can't do this.
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Value change icon

Post by PtitChat107 »

balala wrote:Besides this, the [MeasureFacebook] also fails, because:
  • The used Facebook page doesn't exists, it seems (at least me couldn't find it).
  • Even if it would exists, Facebook requires a logon, but the WebParser measures can't do this.
What is strange is that it works on my side, after applying the correction that you suggest it works very well but it's sad to have lost my famous separation units, it made the text more readable . I'm going to look to apply the same to the YouTube lines and the BTC balance and if I really can not, I'll come back to you lol :oops:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Value change icon

Post by balala »

PtitChat107 wrote:it's sad to have lost my famous separation units, it made the text more readable .
No, you haven't lose it. Just have to create a new Calc measure, which contains the previously removed substitution and use the value returned by this measure just into the appropriate String meter.
Eg, add the following measure:

Code: Select all

[measurePoleEmploiNational2]
Measure=Calc
Formula=[measurePoleEmploiNational]
RegExpSubstitute=1
Substitute="^(\d+)(\d{3})$":"\1 \2"
DynamicVariables=1
See that this measure has the previously removed Substitute option.
Now modify the MeasureName option of the [meterValuePoleEmploiNational] meter to MeasureName=measurePoleEmploiNational2. This way the "separated" value is used only into the [meterValuePoleEmploiNational] meter, nowhere else.
But here I have one more remark: if you've put a MeasureName=measurePoleEmploiNational option into the [meterValuePoleEmploiNational] meter, the Text option of this meter shouldn't have to be Text=[color=#FF0000][measurePoleEmploiNational][/color] offres #DirIcon#, but better Text=[color=#22FF22]%1[/color] offres #DirIcon#.

Obviously if you find this solution a good one, you have to do the same thing with the [measurePoleEmploiDoubs] measure, too (creating a measure named [measurePoleEmploiDoubs2] - or obviously name it as you want).