It is currently April 25th, 2024, 10:36 am

Currency USDPLN

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Currency USDPLN

Post by balala »

kehtron1 wrote: October 28th, 2021, 7:13 pm Hi
It was enough to change Newspaper \ UserVariables.inc
It's OK.
Best regards
Mariusz
Great! :thumbup:
User avatar
kehtron1
Posts: 28
Joined: October 27th, 2021, 11:34 am
Location: Poland

Re: Currency USDPLN

Post by kehtron1 »

Hello
Hello
What happened.
Today I start the computer and the skin is not displayed.
By default, it is on, because if I am naiada, it shows turn off the skin.
So it is active but not visible.
Why? I haven't changed anything since yesterday.
It was OK.
Today NO
Best regards
Mariusz
You do not have the required permissions to view the files attached to this post.
User avatar
Active Colors
Moderator
Posts: 1252
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Currency USDPLN

Post by Active Colors »

kehtron1 wrote: October 29th, 2021, 6:25 am Hello
Hello
What happened.
Today I start the computer and the skin is not displayed.
By default, it is on, because if I am naiada, it shows turn off the skin.
So it is active but not visible.
Why? I haven't changed anything since yesterday.
It was OK.
Today NO
Best regards
Mariusz
1. I don't see that you have enabled the option to "save position". It should be enabled by default. Leave these checkmarks on your skin:
Capture.PNG
2. Make sure you have chosen a correct monitor. By default it should be Primary monitor. Like this:
2.PNG
3. And then refresh your skin from that Manage window, the button is [Odswiez] in Polish I believe.

4. If nothing helps, check your Log. Right click on Rainmeter icon in the tray, choose About, and you will see the Log. Are there any errors? Post the screenshot of it if there are any errors.
You do not have the required permissions to view the files attached to this post.
User avatar
kehtron1
Posts: 28
Joined: October 27th, 2021, 11:34 am
Location: Poland

Re: Currency USDPLN

Post by kehtron1 »

Hi
I did everything as you ordered, the skin is still inactive.
The photos show skin 1 and 2 with the same settings.
One works, the other doesn't.
And a photo of the bugs is probably that.
Best regards
Mariusz
You do not have the required permissions to view the files attached to this post.
User avatar
kehtron1
Posts: 28
Joined: October 27th, 2021, 11:34 am
Location: Poland

Re: Currency USDPLN

Post by kehtron1 »

Code: Select all

[Metadata]
Name=Currency
Description=A gadget to see currencys exchange rate
Version=1
Author=kehtron1

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1
SkinWidth=130
SkinHeight=65

[Variables]
FontName=Caladea
FontSize=26

;----------------------------------------

[MeasureCurrency]
Measure=WebParser
Url=https://www.bankier.pl/waluty/kursy-walut/forex/USDPLN
RegExp=(?siU)<div class="right textNowrap">.*<div class="profilLast">(.*)</div>.*<div class="change  down">
StringIndex=1
UpdateRate=300

[MeterCurrency]
Meter=String
MeasureName=MeasureCurrency
X=64
Y=34
FontSize=#FontSize#
FontColor=164,32,32,255
FontFace=#FontName#
stringAlign=CenterCenter
StringStyle=BOLD
AntiAlias=1
Text=%1
Last edited by balala on October 29th, 2021, 12:05 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Currency USDPLN

Post by balala »

kehtron1 wrote: October 29th, 2021, 9:41 am I did everything as you ordered, the skin is still inactive.
The photos show skin 1 and 2 with the same settings.
One works, the other doesn't.
No it probably is active, but the source site has been modified in meantime. So the skin doesn't get the required exchange rate anymore. Since there is nothing to be shown beside the parsed rate, if this can't be read, the skin remains blank.
This is an issue which happens quite frequently when working with (let's say) "general" sites. The original code worked with an xml format of data available on the site of European Central Bank. This ensures the data are readable anytime, the source doesn't change its format.
The best approach to fix this would be to find such an information format available on the Bank of Poland (or whatever is its name). Otherwise this kind of error will come out more or less frequently, but for sure sooner or later will. So, is there any this kind of source available?
User avatar
kehtron1
Posts: 28
Joined: October 27th, 2021, 11:34 am
Location: Poland

Re: Currency USDPLN

Post by kehtron1 »

Hi
I don't know enough about it to authoritatively give anything as a source for this skin.
All 3 sites I've given you earlier have online quotes, and they upload it on their site.
You, as a programmer, can judge it best.
By visiting these pages you have to judge whether you have access to the data you need.
And if they give you access to the source code, I do not know.
Yesterday the rind worked for several hours. She just shut down today.
Best regards
Mariusz
User avatar
kehtron1
Posts: 28
Joined: October 27th, 2021, 11:34 am
Location: Poland

Re: Currency USDPLN

Post by kehtron1 »

Hi
I entered the quotes page.
I gave show the source of the page and saved it in odf format
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Currency USDPLN

Post by eclectic-tech »

You need to remove the last portion of the RegExp in your Webparser measure; it is looking for "down" change, while that value could be "up" or "down".

Current RegExp:
RegExp=(?siU)<div class="right textNowrap">.*<div class="profilLast">(.*)</div>.*<div class="change down">
New RegExp:
RegExp=(?siU)<div class="right textNowrap">.*<div class="profilLast">(.*)</div>

The updated section:

Code: Select all

[MeasureCurrency]
Measure=WebParser
Url=https://www.bankier.pl/waluty/kursy-walut/forex/USDPLN
RegExp=(?siU)<div class="right textNowrap">.*<div class="profilLast">(.*)</div>
StringIndex=1
UpdateRate=300
This should get the value whether it goes up or down.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Currency USDPLN

Post by balala »

See eclectic-tech's solution above, or try out the following one, using another source. Each of these solutions will work at least a while.
To use the third URL form the provided ones, try replacing the [MeasureCurrency] measure with the following one:

Code: Select all

[MeasureCurrency]
Measure=WebParser
Url=https://biznes.interia.pl/waluty/notowania-online/profil-pary-walutowej-usdpln,wId,2429
RegExp=(?siU)<strong class='business-info-profile-live-value' data-unit=''>(.*)</strong>
RegExpSubstitute=1
Substitute="\s":""
StringIndex=1
UpdateRate=600
As you can see I replaced both the URL and the RegExp options.
Doesn't really matter which solution do you choose from these two (eclectic-tech's and the above one). It's completely up to you.
kehtron1 wrote: October 29th, 2021, 12:44 pm You, as a programmer, can judge it best.
I am not a programmer and Rainmeter is definitely not a programming language (last paragraph here).
kehtron1 wrote: October 29th, 2021, 1:18 pm I gave show the source of the page and saved it in odf format
Why?