It is currently April 19th, 2024, 4:20 pm

Help with custom slideshow

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with custom slideshow

Post by balala »

Flynnw wrote: February 22nd, 2020, 4:22 pm Thanks Balala it works !
I'm glad. Good work!
Flynnw wrote: February 22nd, 2020, 4:22 pm sorry i think i messed it up there is no D variable that's just me being a noob, again sorry :(
Don't worry, we all make such mistakes sometimes. It happens sometimes. The purpose of this forum is exactly to identify and indicate such mistakes to the authors. Because if someone else is looking to a code, in many cases can much more easily identify them, than the author. So, it's ok...
Flynnw wrote: February 22nd, 2020, 4:22 pm so now the issues are the images are displayed In the grey circle too small, i want the display to be the pure images non formatted whatsoever.
If you want to resize them, just remove or modify the W and H options of the [meterArrow] meter. If you remove them, the images will be shown on their own size, while if you replace them with some other values, the images, obviously, will be shown at the set size. You have to decide what size do you prefer.
Flynnw wrote: February 22nd, 2020, 4:22 pm and of course there is the issue with the delay but that's not too serious for now.
As said, that issue can be easily fixed. And yep, it is serious, so has to be fixed.
For this add a [!UpdateMeasure "MeasureImage"] bang into the KeyUpAction option of the [measureHotKey] measure (beside the already existing bangs), along with a [!UpdateMeter "meterArrow"]. With these, the KeyUpAction option will look like this: KeyUpAction=[!SetVariable Num (#Num#+1)][!UpdateMeasure "MeasureImage"][!UpdateMeter "meterArrow"][!UpdateMeter meterNum][!Redraw].
Has this fixed the delay issue?
Flynnw
Posts: 8
Joined: February 21st, 2020, 11:02 pm

Re: Help with custom slideshow

Post by Flynnw »

Thanks for all the help balala it's very much apreciated,

So i'm really getting close to what i want, now the only main issue left is this :

Image

i want to get rid of the circle and the grey transparentish borders to leave just the picture and the number of order.

The other problem is, if i press the Key back to back twice, sometimes it doesn't register the second press, hence why i want the number of order, to know at which step of the sequence i'm at.

the last thing is it doesn't loop and keeps going, but it's not really an issue since i can just restart the skin

Edit : i figured out how to remove the circle, i did it by removing the following lines

Code: Select all

[meterShape]
Meter=Shape
X=0
Y=0
Shape=Ellipse 12,12,12 | Fill Color 255,255,255,192
but still, can't get to remove the grey borders
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Help with custom slideshow

Post by mak_kawa »

For the first thing, remove BackgroundMode=2 and SolidColor=128,128,128,192 from [Rainmeter] section.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Help with custom slideshow

Post by mak_kawa »

For the last thing...if you want to loop when #Num# exceeds 5, for example, add following two lines to the [measureHotKey] measure.

Code: Select all

IfCondition=#Num#>5
IfTrueAction=[!SetVariable Num 0]
You can change the number "5" as you like.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Help with custom slideshow

Post by mak_kawa »

For the second thing.

Probably the cause of the issue is that the [measureHotKey] measure is updated every 1000 ms (1 second). There seems to be no trigger for instant updating of the HotKey measure. But I am not sure that I am right.

So my "desperate" workaround is... Change Update=1000 to Update=500 and add DefaultUpdateDivider=2 in [Rainmeter] section. And also add UpdateDivider=1 to [measureHotKey] measure.
By this change, whole skin is updated every 500*2=1000 ms (1 seocnd), but only [measureHotKey] measure is updated (and recieve hot key action) every 500 ms (0.5 second).
In my test of this setting, almost no "key press not registered" issue is noticeable.
Flynnw
Posts: 8
Joined: February 21st, 2020, 11:02 pm

Re: Help with custom slideshow

Post by Flynnw »

mak_kawa wrote: February 22nd, 2020, 9:29 pm For the second thing.

Probably the cause of the issue is that the [measureHotKey] measure is updated every 1000 ms (1 second). There seems to be no trigger for instant updating of the HotKey measure. But I am not sure that I am right.

So my "desperate" workaround is... Change Update=1000 to Update=500 and add DefaultUpdateDivider=2 in [Rainmeter] section. And also add UpdateDivider=1 to [measureHotKey] measure.
By this change, whole skin is updated every 500*2=1000 ms (1 seocnd), but only [measureHotKey] measure is updated (and recieve hot key action) every 500 ms (0.5 second).
In my test of this setting, almost no "key press not registered" issue is noticeable.
Thanks for the help, so everything is working fine, i set update = 500, and there is just no lag anymore.

I don't see the point tho from adding the dividers? am i missing something, changing the update rate alone solved my issue.
Flynnw
Posts: 8
Joined: February 21st, 2020, 11:02 pm

Re: Help with custom slideshow

Post by Flynnw »

Thank you Balala and mak_kawa, it is now working perfectly in line with what i expected.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Help with custom slideshow

Post by mak_kawa »

Ah...if your skin (and system) works fine, it's alright. :-)

Update=500 option updates whole skin (=all meters and measures) every 500 ms. So, the skin action may or may not impact on your system perfomance. It depends on the structure and contents of the skin, I am not sure.

DefaultUpdateDivider=2 and UpdateDivider=1 options are to avoid such performance impact. But again, they are unnecessary for you, maybe.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with custom slideshow

Post by balala »

mak_kawa wrote: February 22nd, 2020, 9:10 pm For the last thing...if you want to loop when #Num# exceeds 5, for example, add following two lines to the [measureHotKey] measure.

Code: Select all

IfCondition=#Num#>5
IfTrueAction=[!SetVariable Num 0]
You can change the number "5" as you like.
Not needed to complicate things. It definitely work even this way, but it's much more simple if you modify the formula of calculating the value of the Num variable. So, if you want to give it a try, remove the IfCondition and modify the first !SetVariable bang of the KeyUpAction option of the [measureHotKey] measure this way: [!SetVariable Num "((#Num#+1)%4)"] (supposing there are four images, numbered from 0 to 3). The number used into the above modulo operation has to be greater with one, than the number of the last image.
This way the value of the Num variable doesn't go above 3. Not needed to "reset" it, once certain value is achieved.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with custom slideshow

Post by balala »

mak_kawa wrote: February 22nd, 2020, 9:29 pm So my "desperate" workaround is... Change Update=1000 to Update=500 and add DefaultUpdateDivider=2 in [Rainmeter] section. And also add UpdateDivider=1 to [measureHotKey] measure.
By this change, whole skin is updated every 500*2=1000 ms (1 seocnd), but only [measureHotKey] measure is updated (and recieve hot key action) every 500 ms (0.5 second).
In my test of this setting, almost no "key press not registered" issue is noticeable.
Although reducing the Update to 500 makes the skin to properly work, I'd propose to keep the Update to the default 1000 (but see one more below) and update the HotKey plugin measure when you hit the appropriate key on the keyboard. I'm not sure why do you say that "There seems to be no trigger for instant updating of the HotKey measure", because it can be simply updated through an !UpdateMeasure bangs. Just tried and it works perfectly.
If anyone wants to try out what am I talking about, try to add such a bang to the KeyUpAction option of the [measureHotKey] measure. With it, the option looks like this: KeyUpAction=[!SetVariable Num "((#Num#+1)%4)"][!UpdateMeasure "#CURRENTSECTION#"][!UpdateMeasure "MeasureImage"][!UpdateMeter "meterArrow"][!UpdateMeter meterNum][!Redraw] (note that the first !SetVariable bang of the above option is modified as I described in my previous reply).
And finally what I said about the Update value of the skin. For entirely mouse or keyboard controlled skins, like this one (assuming this is the entire code), an even better possibility is to make it not to update at all. For this you can set the Update to Update=-1. If you do this, you have to take care to always update the appropriate measures and meters and redraw the skin manually whenever something is changing. For this you have to use more (a lot of...) !UpdateMeasure / !UpdateMeter, along with !Redraw bangs. But it's not impossible at all. I suppose many people don1t agree with me in this, but for skins which don't require a regular update, being, as said, entirely mouse / keyboard controlled, it's a better approach.
For instance this code, using the Update=-1, look like this:

Code: Select all

[Rainmeter]
Update=-1

[Variables]
Num=0

[measureHotKey]
Measure=Plugin
Plugin=HotKey
HotKey=UP
;Shift 0
KeyUpAction=[!SetVariable Num "((#Num#+1)%4)"][!UpdateMeasure "#CURRENTSECTION#"][!UpdateMeasure "MeasureImage"][!UpdateMeter "meterArrow"][!UpdateMeter meterNum][!Redraw]
DynamicVariables=1

[MeasureImage]
Measure=Calc
Formula=#Num#
RegExpSubstitute=1
Substitute="^(.*)$":"D:\Images\\1.png"
DynamicVariables=1

[meterArrow]
Meter=Image
MeasureName=MeasureImage 
X=5
Y=5
W=15
H=15

[meterNum]
Meter=String
FontSize=7
FontColor=0,0,255,192
StringStyle=Bold
X=22
Y=17
Text=#Num#
DynamicVariables=1
If you wanna give it a try, check the path used into the Substitute option of the [MeasureImage] measure.