It is currently October 15th, 2024, 12:04 am

New UniqueRandom option

Changes made during the Rainmeter 3.0 beta cycle.
User avatar
jsmorley
Developer
Posts: 22856
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New UniqueRandom option

Post by jsmorley »

Well, if you are using the skin .rmskin I posted earlier in this thread, there is nothing about it that makes you wait for the next "SecondsBetween" to start displaying...
rupture
Posts: 9
Joined: October 25th, 2013, 5:55 am

Re: New UniqueRandom option

Post by rupture »

yes i am using that. and if i set the SecondsBetween to 60 i'm looking at the grey background for 60 seconds before the first image loads.
User avatar
jsmorley
Developer
Posts: 22856
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New UniqueRandom option

Post by jsmorley »

rupture wrote:yes i am using that. and if i set the SecondsBetween to 60 i'm looking at the grey background for 60 seconds before the first image loads.
Perhaps you have a file (the .rmskin is looking for Extensions=jpg;png;bmp in the folder(s)) that it is trying to display but is unable to for some reason (the wrong extension on the file for what it really is, a corrupted image, something like that)

Load the skin and see what is displayed in the About / Skin panel for that skin. That might point us toward something.
10-25-2013 11-36-46 AM.jpg
You do not have the required permissions to view the files attached to this post.
rupture
Posts: 9
Joined: October 25th, 2013, 5:55 am

Re: New UniqueRandom option

Post by rupture »

here you go.
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22856
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New UniqueRandom option

Post by jsmorley »

Nothing jumps out at me as a problem. I'm not sure what is going on for you.
rupture
Posts: 9
Joined: October 25th, 2013, 5:55 am

Re: New UniqueRandom option

Post by rupture »

yea, i don't know. the higher i set SecondsBetween the longer i have to wait for the first image to show up. it's weird.
rupture
Posts: 9
Joined: October 25th, 2013, 5:55 am

Re: New UniqueRandom option

Post by rupture »

ok i'm out. i'll check back later if you have any ideas. thanks for the help.
User avatar
jsmorley
Developer
Posts: 22856
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New UniqueRandom option

Post by jsmorley »

You could zip up the entire skin folder (so I get the images as well as the skin) and attach it here so I can take a look. We must be missing something.
rupture
Posts: 9
Joined: October 25th, 2013, 5:55 am

Re: New UniqueRandom option

Post by rupture »

only thing i changed was ImagePath and SecondsBetween.
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22856
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New UniqueRandom option

Post by jsmorley »

Found it...

The issue is something I missed when I created the skin. The random number measure is being evaluated along with the other FileView measures when the skin is first loaded, but the FileView measures take some time (not a lot, but some) and the value of MeasureCount (the number of files it found) is not being set until "after" the random number is created the first time.

Since there is no "HighBound" set for the random measure at that point, it is defaulting to "100" and looking for a random image with a FileView index of somewhere between 1 and 100.

In the case of my setup when I created the skin, that always "seemed" to work fine, as there were 300 or 400 images in the folder tree I was accessing.

In your case, with only 3 images, the first pass through (before the next SecondsBetween) is almost always going to be a non-existent FileView index.

In any case, I changed a couple of measures, to deal with this:

Code: Select all

[MeasureFolder]
Measure=Plugin
Plugin=FileView
Recursive=2
Path=#ImagePath#
Extensions=jpg;png;bmp
FinishAction=[!EnableMeasure MeasureRandom]

[MeasureCount]
Measure=Plugin
Plugin=FileView
Path=[MeasureFolder]
Type=FileCount
OnChangeAction=[!SetOption MeasureRandom HighBound [MeasureCount]]

[MeasureRandom]
Measure=Calc
Formula=Random
UpdateRandom=1
UniqueRandom=1
LowBound=1
UpdateDivider=#SecondsBetween#
OnUpdateAction=[!UpdateMeasure MeasureImagePath][!UpdateMeter *][!Redraw]
Disabled=1
So we start with MeasureRandom "disabled", and "enable" it when the FileView plugin is done the first time through. That should fix it for you.