It is currently April 27th, 2024, 8:15 pm

[Solved] Using a URL for an imagename

Get help with creating, editing & fixing problems with skins
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

[Solved] Using a URL for an imagename

Post by Seahorse »

I'm experimenting with a skin that could use images from the internet and whilst the RegExp happily pulls it, the image meter remains blank. Take the example below for instance:

http://ia.media-imdb.com/images/M/MV5BMTQwMzQ5Njk1MF5BMl5BanBnXkFtZTcwNjIxNzIxNw@@._V1._SY30_SX23_.jpg

Now, is this because I'm trying to do something Rainmeter can't or is is something related to with the massive filename; the two @ look a bit suspicious to me for instance. I don't want to code any more of the skin if this part doesn't work at all, as it defeats the object of the skin.
Last edited by Seahorse on January 8th, 2012, 8:34 pm, edited 1 time in total.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using a URL for an imagename

Post by jsmorley »

Works fine for me...

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[MeasureImage]
Measure=Plugin
Plugin=WebParser
URL=http://ia.media-imdb.com/images/M/MV5BMTQwMzQ5Njk1MF5BMl5BanBnXkFtZTcwNjIxNzIxNw@@._V1._SY30_SX23_.jpg
Download=1

[MeterImage]
Meter=Image
MeasureName=MeasureImage
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Using a URL for an imagename

Post by Mordasius »

User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Using a URL for an imagename

Post by Seahorse »

I'm capturing the image URL in the main Webparser, yours is separate, does that make a difference as I'm using 15 stringindexes and feeding the image URL via a measure & StringIndex, oh, and capturing three image URLs in the main WebParser.

So I have this:

Code: Select all

[MeasureTop3]
Measure=Plugin
Plugin=WebParser
UpdateRate=1800
Url=http://www.imdb.com/boxoffice/?region=uk
RegExp="(?siU).*Weekend.*src="(.*)".*href="(.*)">(.*)</a>.*163;(.*)</td>.*163;(.*)

</td>.*src="(.*)".*href="(.*)">(.*)</a>.*163;(.*)</td>.*163;(.*)</td>.*src="(.*)".*href="(.*)">(.*)

</a>.*163;(.*)</td>.*163;(.*)</td>"
Download=1
this:

Code: Select all

[MeasurePosterURLFilm1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureTop3]
Substitute="&nbsp;":","
StringIndex=1
leading to this:

Code: Select all

[MeterPosterFilm1]
Meter=Image
MeasureName=MeasurePosterURLFilm1
X=10
Y=60
W=190
H=90
So am I getting something wrong here, or do I need to break out the image URL RegExp "captures" from the main one?

parse is fine:
Capture.PNG
You do not have the required permissions to view the files attached to this post.
Last edited by Seahorse on January 8th, 2012, 3:32 pm, edited 1 time in total.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Using a URL for an imagename

Post by smurfier »

I believe Download=1 would go onto the measure that returns the image url which is [MeasurePosterURLFilm1], not the parent 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
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using a URL for an imagename

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[MeasureTop3]
Measure=Plugin
Plugin=WebParser
UpdateRate=1800
Url=http://www.imdb.com/boxoffice/?region=uk
RegExp="(?siU).*Weekend.*src="(.*)".*href="(.*)">(.*)</a>.*163;(.*)</td>.*163;(.*)</td>.*src="(.*)".*href="(.*)">(.*)</a>.*163;(.*)</td>.*163;(.*)</td>.*src="(.*)".*href="(.*)">(.*)</a>.*163;(.*)</td>.*163;(.*)</td>"

[MeasureImage1]
Measure=Plugin
Plugin=WebParser
URL=[MeasureTop3]
StringIndex=1
Download=1

[MeasureImage2]
Measure=Plugin
Plugin=WebParser
URL=[MeasureTop3]
StringIndex=6
Download=1

[MeterImage1]
Meter=Image
MeasureName=MeasureImage1
Y=R

[MeterImage2]
Meter=Image
MeasureName=MeasureImage2
Y=R
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Using a URL for an imagename

Post by Seahorse »

Result! Many thanks. :thumbup:
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Using a URL for an imagename

Post by Mordasius »

I'm sure I'm missing something here, so if you can't post the entire skin, perhaps you could drop us a screen-shot of the About-Rainmeter-Measures for your skin so we can see what is going on....

Oops too late.. problem solved by smurfier and jsmorley
Last edited by Mordasius on January 8th, 2012, 4:01 pm, edited 1 time in total.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Using a URL for an imagename

Post by Seahorse »

Just realised I made a mental note earlier to append the missing http:\\ etc in front of the URL. You know where that is leading...Doh! :vomit:

Just titivating for now...
Capture.PNG
You do not have the required permissions to view the files attached to this post.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt