It is currently March 28th, 2024, 8:49 pm

Value change icon

Get help with creating, editing & fixing problems with skins
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Value change icon

Post by PtitChat107 »

balala wrote:

Code: Select all

[...]
Substitute="^(\d+)(\d{3})$":"\1 \2"
[...]
Oh, but it's great !!! :jawdrop Tell me that there is the same substitution for "inverted", to go from a "detached" number to something without spaces between units. I think that could be the solution I'm looking for to make the remaining parts work. I must also understand why the lines are completely colored and why the line "BitcoinSolde" does not work properly and it will be perfect! :D
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:Tell me that there is the same substitution for "inverted", to go from a "detached" number to something without spaces between units.
Not needed I think. You have the substituted measures to be used into the String meters and the unsubstituted measures (the WebParser measures) to be used everywhere else. No needed to make one more substitution.
PtitChat107 wrote:I must also understand why the lines are completely colored
If you're talking for example about the Pôle Emploi line, that is colored by the !SetOption bangs of the IfTrueAction options of the [measurePoleEmploiNationalPrev] measure. Those bangs set a color for the whole String meter, because that meter doesn't have set an InlinePattern. The InlineSetting is set by the !SetOption bangs, but you don't have an InlinePattern. Without those, the InlineSetting is related to the whole string meter. Add it directly to the meter:

Code: Select all

[meterValuePoleEmploiNational]
...
InlinePattern=^([measurePoleEmploiNational2]).*$
With this option, the shown numeric value is colored, the rest remains white. This is what you wanted to color?
PtitChat107 wrote:why the line "BitcoinSolde" does not work properly
Probably you're talking about the [MeasureBitcoinPriceSolde] measure, right? If so, there are a more problems, but from these one is which makes the measure to not work. Probably that measure initially was a WebParser measure. You forgot to remove a lot of options which aren't neither needed, nor valid on the Calc measures: Plugin, StringIndex and finally FinishAction. Remove all these. But this wouldn't be a problem which would make the measure not to work. But there is one more, which makes it.
Even if a WebParser measure returns a numeric value, that value is in fact a string and have to be converted to number. This can be done replacing the formula of the measure with the following one: Formula=[color=#FF0000][[/color]measureBitcoinSolde[color=#FF0000]][/color]*[color=#FF0000][[/color]MeasureBitcoin[color=#FF0000]][/color]. This replace will also require to add a DyanmicVariables=1 option to the same [MeasureBitcoinPriceSolde] measure, too. Don't forget neither that.
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Value change icon

Post by PtitChat107 »

I think I'll let you look at it in detail and tell me if it's really feasible because I'm really starting to have a headache, I must think to rest! :17flag
I believe, very sincerely, that for YouTube and Facebook it is hardly lost in advance; finally for Facebook I could look at this much more carefully from my side, see find another source to retrieve the info I'm looking for; but Youtube I really have some doubts. And now the line concerning the price of Bitcoin is totally colored whereas before that was not the case then the euro amount in the Bitcoin wallet does not even show up :rofl:

Edit.: I correct something and I tell you what it is!

So, little edition; I could understand this color problem: it was an error on my part about a bad copy / paste. So in any case everything seems to work perfectly, apart from the 3 remaining lines... So much for me, I think everything stays blue even if the numbers go down (the lines of Pôle Emploi)
Last edited by PtitChat107 on July 14th, 2018, 10:01 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 »

And again: don't use the Text option of a String meter as you did it on the [meterValueBitcoinSolde] meter (Text=[MeasureBitcoinPriceSolde] € #DirIcon#). This Text option requires to add a DynamicVariables=1 option to the String meter. Not needed at all. Just replace the Text option with Text=%1 € #DirIcon#, which doesn't require to set the dynamic variables.
Same about the [meterValueBitcoin] meter: replace its Text=[measureBitcoin] € #DirIcon# option with Text=%1 € #DirIcon#.
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Value change icon

Post by PtitChat107 »

Hi Balala, I did what I could on my side; moreover concerning the address of a Facebook page :???:
Last edited by PtitChat107 on August 6th, 2018, 8:34 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:Hi Balala, I did what I could on my side; moreover concerning the address of a Facebook page :???:
Further recommendations:
  • Don't use substitution on the [measureDay] measure. It's not needed. Instead replace its Substitute option with the following one: FormatLocale=fr-FR (eventually you can add a StringCase=Proper option to the [meterDay] meter).
  • There are two error messages in the log, related to the [measurePoleEmploiDoubs2] and [measurePoleEmploiNational2] measures. In the very first moment, when the WebParser measures didn't get yet the value, the empty values are replaced by the Substitute options of the [measurePoleEmploiDoubs] and [measurePoleEmploiNational] measures with a .... But the [measurePoleEmploiDoubs2] and [measurePoleEmploiNational2] measures, being Calc measures, can't handle this character. This gives the error. To avoid it, simply modify the Calc measures to String measures:

    Code: Select all

    [measurePoleEmploiDoubs2]
    Measure=String
    String=[measurePoleEmploiDoubs]
    RegExpSubstitute=1
    Substitute="^(\d+)(\d{3})$":"\1 \2"
    DynamicVariables=1
    
    ...
    
    [measurePoleEmploiNational2]
    Measure=String
    String=[measurePoleEmploiNational]
    RegExpSubstitute=1
    Substitute="^(\d+)(\d{3})$":"\1 \2"
    DynamicVariables=1
  • Another Calc: Extra operation error message is given by the [MeasureBitcoinPriceSolde] measure. Here you can read why that error appears. To fix it, just add the following two options to both the [measureBitcoin] and [measureBitcoinSolde] measures (both WebParser measures, used into the Formula option of the [MeasureBitcoinPriceSolde] measure):

    Code: Select all

    RegExpSubstitute=1
    Substitute="^$":"0"
    This way in the first moment, while the WebParser measures didn't get any value yet, they are returning 0 and this avoids the error message.
  • Does the [measureYoutube] measure gives another RegExp matching error (-1) error?
  • The [MeasureFacebook] measure doesn't work and I doubt it could be done to does, because Facebook requires logon, but the WebParser measures can't do this (https://forum.rainmeter.net/viewtopic.php?p=150355#p150355). I'm afraid, there is no solution for this and you can't make this measure (and its child measures) to work. Sorry...
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Value change icon

Post by PtitChat107 »

Thank you Balala, in this case it remains for me to focus on the part "[measureYoutube]" and "[MeasureBitcoinPriceSolde]", on the other hand small question: on my side the signage concerning the parts "Pôle Emploi"; is it normal that the colors do not match? :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:Thank you Balala, in this case it remains for me to focus on the part "[measureYoutube]" and "[MeasureBitcoinPriceSolde]", on the other hand small question: on my side the signage concerning the parts "Pôle Emploi"; is it normal that the colors do not match? :oops:
There is a problem: in the IfTrueAction options of both measures [measurePoleEmploiDoubsPrev] and [measurePoleEmploiNationalPrev], there is set a DirIcon variable, which is then used into two meters: [meterValuePoleEmploiDoubs] and [meterValuePoleEmploiNational]. But these icons should have to be different, and accordingly you should have to set two different variables into the two measures. Let's say set DirIcon1 into the [measurePoleEmploiDoubsPrev] measure and DirIcon2 into [measurePoleEmploiNationalPrev]. Then should have to use them appropriately in the corresponding meters (see below).

As a side note, I'd remove the !SetOption bangs from the IfTrueAction options of both measures [measurePoleEmploiDoubsPrev] and [measurePoleEmploiNationalPrev], which set the InlinePattern options (because those options never change) and would add these options directly to the appropriate meters: [meterValuePoleEmploiDoubs] and [meterValuePoleEmploiNational]. But these two meters should have to use different icons (arrows), so into the two measures you should have to set two different variables (let's say DirIcon1 and DirIcon2, or DirIconDoubs and DirIconNational) and should have to use them appropriately into the two meters.

Code: Select all

[measurePoleEmploiDoubsPrev]
Measure=Calc
Formula=[measurePoleEmploiDoubs]
DynamicVariables=1
Disabled=1
UpdateDivider=-1
IfCondition=#PrevValuePEDoubs# > [measurePoleEmploiDoubs]
IfTrueAction=[!SetVariable DirIcon1 "▼"][!SetOption meterValuePoleEmploiDoubs InlineSetting "Color | 255,0,0,255"][!SetVariable PrevValuePEDoubs "[measurePoleEmploiDoubs]"][!WriteKeyValue Variables PrevValuePEDoubs "[measurePoleEmploiDoubs]" "/PrevVariables.inc"][!UpdateMeter *][!Redraw]
IfCondition2=#PrevValuePEDoubs# < [measurePoleEmploiDoubs]
IfTrueAction2=[!SetVariable DirIcon1 "▲"][!SetOption meterValuePoleEmploiDoubs InlineSetting "Color | 0,255,0,255"][!SetVariable PrevValuePEDoubs "[measurePoleEmploiDoubs]"][!WriteKeyValue Variables PrevValuePEDoubs "[measurePoleEmploiDoubs]" "/PrevVariables.inc"][!UpdateMeter *][!Redraw]
IfCondition3=#PrevValuePEDoubs# = [measurePoleEmploiDoubs]
IfTrueAction3=[!SetVariable DirIcon1 "▬"][!SetOption meterValuePoleEmploiDoubs InlineSetting "Color | 0,0,255,255"][!SetVariable PrevValuePEDoubs "[measurePoleEmploiDoubs]"][!WriteKeyValue Variables PrevValuePEDoubs "[measurePoleEmploiDoubs]" "/PrevVariables.inc"][!UpdateMeter *][!Redraw]

...

[measurePoleEmploiNationalPrev]
Measure=Calc
Formula=[measurePoleEmploiNational]
DynamicVariables=1
Disabled=1
UpdateDivider=-1
IfCondition=#PrevValuePE# > [measurePoleEmploiNational]
IfTrueAction=[!SetVariable DirIcon2 "▼"][!SetOption meterValuePoleEmploiNational InlineSetting "Color | 255,0,0,255"][!SetVariable PrevValuePE "[measurePoleEmploiNational]"][!WriteKeyValue Variables PrevValuePE "[measurePoleEmploiNational]" "/PrevVariables.inc"][!UpdateMeter *][!Redraw]
IfCondition2=#PrevValuePE# < [measurePoleEmploiNational]
IfTrueAction2=[!SetVariable DirIcon2 "▲"][!SetOption meterValuePoleEmploiNational InlineSetting "Color | 0,255,0,255"][!SetVariable PrevValuePE "[measurePoleEmploiNational]"][!WriteKeyValue Variables PrevValuePE "[measurePoleEmploiNational]" "/PrevVariables.inc"][!UpdateMeter *][!Redraw]
IfCondition3=#PrevValuePE# = [measurePoleEmploiNational]
IfTrueAction3=[!SetVariable DirIcon2 "▬"][!SetOption meterValuePoleEmploiNational InlineSetting "Color | 0,0,255,255"][!SetVariable PrevValuePE "[measurePoleEmploiNational]"][!WriteKeyValue Variables PrevValuePE "[measurePoleEmploiNational]" "/PrevVariables.inc"][!UpdateMeter *][!Redraw]

...

[meterValuePoleEmploiDoubs]
...
Text=%1 offres #DirIcon1#
InlinePattern=^.* offres (.)$

...

[meterValuePoleEmploiNational]
...
Text=%1 offres #DirIcon2#
InlinePattern=^.* offres (.)$
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Value change icon

Post by PtitChat107 »

Little news from me to keep you informed that I managed to find a way to get info from Facebook and Youtube, if you want to check that everything is good on your side I can share here my files (and you privately give the API keys, for security reasons) and I would look forward to your opinion. Do not hesitate to confirm if you have time to take a look. :)
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:Little news from me to keep you informed that I managed to find a way to get info from Facebook and Youtube, if you want to check that everything is good on your side I can share here my files (and you privately give the API keys, for security reasons) and I would look forward to your opinion. Do not hesitate to confirm if you have time to take a look. :)
I definitely have and would be extremely curious to see how did you this. Because my opinion is that it can't be done, especially not with WebParser measures (I explained once why). But there could be solutions I didn't think to, so, please upload the package.