It is currently May 6th, 2024, 9:26 am

Help cycling through images

Get help with creating, editing & fixing problems with skins
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Help cycling through images

Post by smurfier »

On the ReadLabel measures, try removing the RegExp= line with this:

Code: Select all

RegExpSubstitute=1
Substitute='t="(.*)"':"\1"
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
IDontKnow
Posts: 16
Joined: January 18th, 2012, 4:12 am

Re: Help cycling through images

Post by IDontKnow »

Thank you once again, that's fixed it! :D
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Help cycling through images

Post by Mordasius »

smurfier wrote:On the ReadLabel measures, try removing the RegExp= line with this:

Code: Select all

RegExpSubstitute=1
Substitute='t="(.*)"':"\1"
This solves IDontKnow's problem but, out of interest, where did the "T=" prefix come from in the first place? I tried playing around with the RegExps but got stuck as JS Morley's RainRegExp was happily churning out the StringIndex values without any "T=" prefix.
IDontKnow
Posts: 16
Joined: January 18th, 2012, 4:12 am

Re: Help cycling through images

Post by IDontKnow »

I'm not sure where it came from, it is part of the RegExp "(?siU)t=\"(.*)\".*" I'm not sure why it returned the search strings along with the desired text. I tried using StringIndex2, but every time I did that, there was only one entry, and all uses of it were empty.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Help cycling through images

Post by smurfier »

IDontKnow wrote:I'm not sure where it came from, it is part of the RegExp "(?siU)t=\"(.*)\".*" I'm not sure why it returned the search strings along with the desired text. I tried using StringIndex2, but every time I did that, there was only one entry, and all uses of it were empty.
The reason it wasn't working as you had it is because (at least in my experience) RegExp cannot be applied to child measures. It all has to be done in the main measure.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
Brian
Developer
Posts: 2689
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Help cycling through images

Post by Brian »

You can have RegExp's on child measures, but you have to have another layer of child measures to make it work.

For instance:

Code: Select all

[Web]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=http://www.rainmeter.net/cms
RegExp="(?siU)<div (.*)>.*"
UpdateRate=900

[Layer1Child]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Web]
RegExp="(?siU)id="(.*)""
StringIndex=1

[Layer2Child]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Layer1Child]
StringIndex=1
Layer1Child would refer to the first "<div" it finds on the main site, which right now is id="skip-link", then Layer2Child would refer to id in the first div tag which is skip-link

-Brian