It is currently April 25th, 2024, 12:39 am

Using variables in a regex ?

Get help with creating, editing & fixing problems with skins
iPouf
Posts: 2
Joined: July 31st, 2010, 2:14 pm

Using variables in a regex ?

Post by iPouf »

Hello ;)

I'm trying to make a skin which display on desktop lyrics of the currently track played in iTunes.
The plugin can't do that, so I made a file which will contain every lyrics formatted in a specific way for parse it later.

Lyrics.txt (for testing)
#Infected Mushroom - Killing Time#
blabla
bloblo
*
#Justin Bieberlol - Baby#
blibli
blublu
*
Here's my current code :

Code: Select all

[Artist]
Measure=Plugin
Plugin=Plugins\iTunesPlugin.dll
Command=GetCurrentTrackArtist

[Name]
Measure=Plugin
Plugin=Plugins\iTunesPlugin.dll
Command=GetCurrentTrackName

[Parse] 
Measure=Plugin 
Plugin=Plugins\WebParser.dll 
Url=file://C:\Users\Ben\Documents\Rainmeter\Skins\Ben\Lyrics\Lyrics.txt 
RegExp="(?siU)#"[Artist]" - "[Name]"#(.*)*"
DynamicVariables=1 

[Display]
Meter=STRING
MeasureName=Parse
According to this post : http://rainmeter.net/forum/viewtopic.php?p=2020#p2020 , I tried to concatenate variables in the RegExp but it failed. Anyone have a clue in order to help me to complete this ?

Thanks you and forgive my bad english !
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Using variables in a regex ?

Post by poiru »

DynamicVariables doesn't work with plugins :(
iPouf
Posts: 2
Joined: July 31st, 2010, 2:14 pm

Re: Using variables in a regex ?

Post by iPouf »

Oh...so there is no way to do what I'm looking for ? :\