It is currently April 20th, 2024, 2:13 pm

Help with custom slideshow

Get help with creating, editing & fixing problems with skins
Flynnw
Posts: 8
Joined: February 21st, 2020, 11:02 pm

Help with custom slideshow

Post by Flynnw »

Hello everyone, i don't know if i have come to right place, i am new to this so excuse my being a noob.

Basically i want to make a skin that displays a small icon or letter that's preferably movable and small enough to fit inside the windows taskbar.

And i want to be able to bind a key that goes to the next icon or letter/number, on a predefined sequence.

Also if possible i want it to display a tiny number on its corner referencing it's order ( but it's fine since that can be part of the icon itself ).

Kinda like this : ( this is just a photoshopped image ) :
Image
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Help with custom slideshow

Post by mak_kawa »

Hi Flynnw

You can achieve it using Brian's HotKey plugin. Attached is the image of my sample skin code.
test.gif

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=128,128,128,192

[Variables]
Num=0

[measureHotKey]
Measure=Plugin
Plugin=HotKey
HotKey=Shift 0
KeyUpAction=[!SetVariable Num (#Num#+1)][!UpdateMeter meterNum][!Redraw]
DynamicVariables=1

[meterShape]
Meter=Shape
X=0
Y=0
Shape=Ellipse 12,12,12 | Fill Color 255,255,255,192

[meterArrow]
Meter=Image
ImageName=arrow.png
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
In this sample code, hot key action is arbitrarily set to "Shift+0". And of course, the position option of the skin have to set to "stay topmost" in skin management dialog.

Hope I am not misunderstanding your point.
You do not have the required permissions to view the files attached to this post.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Help with custom slideshow

Post by mak_kawa »

And... I wonder what is the relation between this and "custom slideshow"??
User avatar
balala
Rainmeter Sage
Posts: 16148
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with custom slideshow

Post by balala »

mak_kawa wrote: February 22nd, 2020, 1:11 am Attached is the image of my sample skin code.
What this skin seems have missed, is the icon (image) change. As far as i understood, the image should also change, whenever the number is changing:
Flynnw wrote: February 21st, 2020, 11:32 pm And i want to be able to bind a key that goes to the next icon or letter/number, on a predefined sequence.
Am I right?
If I am, You should add one more Calc measure to mak_kawa's code, something like the following one:

Code: Select all

[MeasureImage]
Measure=Calc
Formula=#Num#
RegExpSubstitute=1
Substitute="^(.*)$":"#@#Image\1.png"
DynamicVariables=1
The above measure substitutes the number given by the #Num# variable with the path of some images placed into the @Resources\Images\ folder, named with the appropriate numbers and having all .png extensions. So the images should be @Resources\Images\0.png, @Resources\Images\1.png and so on. Obviously if needed, the path can be changed as you want / need.
Now you should use this measure into an Image meter. For instance, replace the ImageName option of the [meterArrow] meter with an MeasureName=MeasureImage option. Or if you want to keep the [meterArrow] meter as it is, add a new Image meter, using the same MeasureName=MeasureImage option.
Have you got it working? If you have, further improvements are still needed, but first let's see if this is working and is what you need for.
Flynnw
Posts: 8
Joined: February 21st, 2020, 11:02 pm

Re: Help with custom slideshow

Post by Flynnw »

mak_kawa wrote: February 22nd, 2020, 6:26 am And... I wonder what is the relation between this and "custom slideshow"??
Sorry i was not very precise, i meant that the images displayed also change when i click
Flynnw
Posts: 8
Joined: February 21st, 2020, 11:02 pm

Re: Help with custom slideshow

Post by Flynnw »

balala wrote: February 22nd, 2020, 7:49 am What this skin seems have missed, is the icon (image) change. As far as i understood, the image should also change, whenever the number is changing:

Am I right?
Yes you are right, that is what i wanted to do, thanks a lot.

I'm still having problems with making it work, the images don't show up, it just shows a grey empty circle with a counter right next to it.
My goal is to be able to display any list of images i want, with a fixed size layout for the whole sequence.
also i want the counter to preferably be inside the image circle itself and not create a grey background beside it,

and another minor issue is there is a slight delay in switching to the next frame, if i click twice on the key too fast it doesn't switch.

Here is my code, where did i go wrong?

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=128,128,128,192

[Variables]
Num=0

[measureHotKey]
Measure=Plugin
Plugin=HotKey
HotKey=CapsLock
KeyUpAction=[!SetVariable Num (#Num#+1)][!UpdateMeter meterNum][!Redraw]
DynamicVariables=1

[meterShape]
Meter=Shape
X=0
Y=0
Shape=Ellipse 12,12,12 | Fill Color 255,255,255,192

[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

[MeasureImage]
Measure=Calc
Formula=#Num#
RegExpSubstitute=1
Substitute="^(.*)$":"#D:\THerun#Image\1.png"
DynamicVariables=1
User avatar
balala
Rainmeter Sage
Posts: 16148
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with custom slideshow

Post by balala »

Flynnw wrote: February 22nd, 2020, 12:49 pm I'm still having problems with making it work, the images don't show up, it just shows a grey empty circle with a counter right next to it.
There probably is a small mistake into the Substitute option of the [MeasureImage] measure. I suppose the path of the images is D:\#THerun#ImageXX.png, where the #THerun# variable might have different values and XX are the appropriate numbers. If so, the # character is in a wrong place. Move it to the proper place: Substitute="^(.*)$":"D:\#THerun#Image\1.png".
Have this fixed the issue?
As said further improvements still needed, but first let's see if the above fixes the issue. If it does, I'll post how to fix the delay problem.
Flynnw
Posts: 8
Joined: February 21st, 2020, 11:02 pm

Re: Help with custom slideshow

Post by Flynnw »

balala wrote: February 22nd, 2020, 1:40 pm There probably is a small mistake into the Substitute option of the [MeasureImage] measure. I suppose the path of the images is D:\#THerun#ImageXX.png, where the #THerun# variable might have different values and XX are the appropriate numbers. If so, the # character is in a wrong place. Move it to the proper place: Substitute="^(.*)$":"D:\#THerun#Image\1.png".
Have this fixed the issue?
As said further improvements still needed, but first let's see if the above fixes the issue. If it does, I'll post how to fix the delay problem.
I still don't know where i went wrong, so i changed the folder's name to "images" and stuck with the original code.

So now the images are named 1,2,3,4 and they are in D:\Images.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=128,128,128,192

[Variables]
Num=0

[measureHotKey]
Measure=Plugin
Plugin=HotKey
HotKey=CapsLock
KeyUpAction=[!SetVariable Num (#Num#+1)][!UpdateMeter meterNum][!Redraw]
DynamicVariables=1

[meterShape]
Meter=Shape
X=0
Y=0
Shape=Ellipse 12,12,12 | Fill Color 255,255,255,192

[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

[MeasureImage]
Measure=Calc
Formula=#Num#
RegExpSubstitute=1
Substitute="^(.*)$":"D:\THerun\#D#Image\1.png"
DynamicVariables=1
User avatar
balala
Rainmeter Sage
Posts: 16148
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with custom slideshow

Post by balala »

Flynnw wrote: February 22nd, 2020, 3:32 pm I still don't know where i went wrong, so i changed the folder's name to "images" and stuck with the original code.

So now the images are named 1,2,3,4 and they are in D:\Images.
Firstly: since the Num variable is initialized to 0, name the images as 0, 1, 2 and 3, instead of 1, 2, 3 and 4. Make sure their format is .png. If not, replace the .png extension into the Substitute option of the [MeasureImage] measure with the appropriate extension.
Secondly: if those images are placed into the D:\Images folder, the Substitute option should reflect this. Probably it should be Substitute="^(.*)$":"D:\Images\\1.png". Note the double backslash after the Images folder name.
Thirdly: not sure what the D variable is. I can't identify it into your code. Or just me have omitted it?

If still can't get it to properly work, please pack the whole config (including the images) and upload the package. Just to can check it.
Flynnw
Posts: 8
Joined: February 21st, 2020, 11:02 pm

Re: Help with custom slideshow

Post by Flynnw »

Thanks Balala it works !

sorry i think i messed it up there is no D variable that's just me being a noob, again sorry :(

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.

and of course there is the issue with the delay but that's not too serious for now.