It is currently April 27th, 2024, 11:30 am

Splitting measure string

Get help with creating, editing & fixing problems with skins
User avatar
Cerberus9
Posts: 2
Joined: February 27th, 2024, 9:32 pm

Re: Splitting measure string

Post by Cerberus9 »

eclectic-tech wrote: February 28th, 2024, 1:59 am Yes, an accurate copy of the json file would be helpful...

If the return is exactly as you posted, then you should be able modify the RegExp and capture each number in a separate stringindex and then use in any meter.
Note: The RegExp was made NOT greedy (the "G" was removed) and each number is captured in a separate index; the data must have 7 numbers, each be separated by a comma and a space, or the expression will fail.
The finish action updates the meter after the data is captured.

....
I didn't want to quote the whole post, but really thanks for the help.

I read it already the day after you answered just had absolutely no time to test it.
I see that Yin you mentioned another solution, but I guess what eclectic wrote is a bit easier for me to apply. Thanks for the further explanations, was really helpful on the topic. I am currently at the stage that I mostly understand what is already written in regex, but can't do it myself and the rainmeter syntax is not helping either.

I got this thing working and that's what matters, thanks again.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Splitting measure string

Post by Yincognito »

Cerberus9 wrote: March 1st, 2024, 6:28 pmI see that Yin you mentioned another solution, but I guess what eclectic wrote is a bit easier for me to apply. Thanks for the further explanations, was really helpful on the topic. I am currently at the stage that I mostly understand what is already written in regex, but can't do it myself and the rainmeter syntax is not helping either.
Sure thing, just choose whatever solution you feel more comfortable with. I'm glad that I could help a bit, at least with some explanation. :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth