It is currently October 9th, 2024, 3:18 am

My First Skin Help

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 8390
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: My First Skin Help

Post by Yincognito »

MourningStar wrote: July 26th, 2021, 12:18 am Perhaps not - updated scroll action. All is well now. thank you!
:thumbup:
Well, I thought you updated it before, but if this solved the issue, it's excellent then! :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
MourningStar
Posts: 300
Joined: June 12th, 2016, 2:40 am

Re: My First Skin Help

Post by MourningStar »

^
thx - as can be seen I have replaced the original font scroll-triggering text (Font:) with a single character ( * ). Possible to add options to use a small graphic/image? Kind of like these little smilies ------> :Whistle in this place? Animation not required but, if possible, desired. I speculate three (maybe two?) sections of code would be required, one for each > text, animated and non-animated. I would not mind manually commenting-out the two unused and, if this is indeed a possiblity, I would probably have a folder of various graphics/images to pick/choose from. Perhaps at sometime in the future, if I ever get my head to evolve my present juvenile coding skillset, I may attempt to incorporate a context menu for this.
User avatar
Yincognito
Rainmeter Sage
Posts: 8390
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: My First Skin Help

Post by Yincognito »

MourningStar wrote: July 26th, 2021, 4:03 pm ^
thx - as can be seen I have replaced the original font scroll-triggering text (Font:) with a single character ( * ). Possible to add options to use a small graphic/image? Kind of like these little smilies ------> :Whistle in this place? Animation not required but, if possible, desired. I speculate three (maybe two?) sections of code would be required, one for each > text, animated and non-animated. I would not mind manually commenting-out the two unused and, if this is indeed a possiblity, I would probably have a folder of various graphics/images to pick/choose from. Perhaps at sometime in the future, if I ever get my head to evolve my present juvenile coding skillset, I may attempt to incorporate a context menu for this.
Yes, it's very much possible. I was thinking at one for Font Color, one for Font Name, and maybe one for Close or something else. What do you think?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
MourningStar
Posts: 300
Joined: June 12th, 2016, 2:40 am

Re: My First Skin Help

Post by MourningStar »

Yincognito wrote: July 26th, 2021, 5:01 pm Yes, it's very much possible. I was thinking at one for Font Color, one for Font Name, and maybe one for Close or something else. What do you think?
Font Color - context menu already has a 'Change Text Color'
Font Name - not desired, recall it is why I did the mod to use character ' * '.
Close - not sure what this is, but probably not.

-thx
User avatar
Yincognito
Rainmeter Sage
Posts: 8390
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: My First Skin Help

Post by Yincognito »

MourningStar wrote: July 26th, 2021, 5:24 pm Font Color - context menu already has a 'Change Text Color'
Font Name - not desired, recall it is why I did the mod to use character ' * '.
Close - not sure what this is, but probably not.

-thx
Ah, so you only want the * to have two alternatives, one being a non-animated icon and the other an animated one, right? With you manually commenting out the 2 variants you don't use at the time?

Also, pack your current state of the skin and post it here - I don't want to get back to the size reset issue by not being on the same page, so to speak. :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
MourningStar
Posts: 300
Joined: June 12th, 2016, 2:40 am

Re: My First Skin Help

Post by MourningStar »

Yincognito wrote: July 26th, 2021, 5:32 pm Ah, so you only want the * to have two alternatives, one being a non-animated icon and the other an animated one, right?

right. so, you do confirm that anim/non-anim would require 2 separate code sections?
Yincognito wrote: July 26th, 2021, 5:32 pmWith you manually commenting out the 2 variants you don't use at the time?
correct - until I learn IF this process can be further streamlined via (context?) menu-picks at a later point in time.
Yincognito wrote: July 26th, 2021, 5:32 pmAlso, pack your current state of the skin and post it here - I don't want to get back to the size reset issue by not being on the same page, so to speak. :D
Did & done.
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 8390
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: My First Skin Help

Post by Yincognito »

MourningStar wrote: July 26th, 2021, 6:24 pm right. so, you do confirm that anim/non-anim would require 2 separate code sections?
Not necessarily - all 3 could be done in a single section, with you commenting out JUST the desired contents of the section (i.e. leaving the section name intact). Or, even using meter styles to dynamically change how the section looks. Unfortunately, meter styles don't support changing the TYPE of the meter, so all 3 (or 2) variants would have to be images.

That being said, the image should preferably remain of the same size, correct (which would be how many pixels, 16, 32, ...)? You know, so that you don't have to always move the mouse to scroll over it...

One other: do you want the animation to happen "forever" or just on mouse hover over the image?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
MourningStar
Posts: 300
Joined: June 12th, 2016, 2:40 am

Re: My First Skin Help

Post by MourningStar »

Yincognito wrote: July 26th, 2021, 7:01 pm Not necessarily - all 3 could be done in a single section, with you commenting out JUST the desired contents of the section (i.e. leaving the section name intact). Or, even using meter styles to dynamically change how the section looks. Unfortunately, meter styles don't support changing the TYPE of the meter, so all 3 (or 2) variants would have to be images.
good point! The text * need not be text at all. So, we have further reduced the font scroll code to graphic only, yes? (this give me the idea to create me a gif, with my Photoshop that would display a single alpha/numeric character scrolling quickly thru all the fonts.)
Yincognito wrote: July 26th, 2021, 7:01 pmThat being said, the image should preferably remain of the same size, correct (which would be how many pixels, 16, 32, ...)? You know, so that you don't have to always move the mouse to scroll over it...
Do not understand this. Right now I have to move the mouse over the * in order for the scroll to scan thru the fonts.
Yincognito wrote: July 26th, 2021, 7:01 pmOne other: do you want the animation to happen "forever" or just on mouse hover over the image?
if it's a resource hog, just on mouse hover I suppose. If not, or dependent on the graphic construct, I would like to have the ability to mod the file for either/or. I use Silverazide's CPU meter gadget to monitor loads. It's how I discovered that other skin was a little hog.
User avatar
Yincognito
Rainmeter Sage
Posts: 8390
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: My First Skin Help

Post by Yincognito »

MourningStar wrote: July 26th, 2021, 8:02 pm good point! The text * need not be text at all. So, we have further reduced the font scroll code to graphic only, yes? (this give me the idea to create me a gif, with my Photoshop that would display a single alpha/numeric character scrolling quickly thru all the fonts.)

Do not understand this. Right now I have to move the mouse over the * in order for the scroll to scan thru the fonts.

if it's a resource hog, just on mouse hover I suppose. If not, or dependent on the graphic construct, I would like to have the ability to mod the file for either/or. I use Silverazide's CPU meter gadget to monitor loads. It's how I discovered that other skin was a little hog.
See if this is suitable:

Code: Select all

[Metadata]
Name=BasicDualTemperature
Author=MourningStar
Co-Authors=zivallh, Yincognito, balala, eclectic-tech & Rainmeter Tutorial
Information=basic dual (C & F) text-only display temperature skin
Version=1.0
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1
OnRefreshAction=[!CommandMeasure FontList "Run"][!CommandMeasure Slider "Stop 1"][!CommandMeasure Slider "Stop 2"][!CommandMeasure Slider "Execute 2"]

RightMouseUpAction=[!SkinCustomMenu]
ContextTitle=Location: [@LocationName]
ContextAction=["https://weather.com/weather/today"]
ContextTitle2=Time: [@CurrentObservationTime] [@LocationTimezoneAbbreviation]
ContextAction2=[]
ContextTitle3=Edit Weather Variables
ContextAction3=["#@#WeatherComJSONVariables.inc"]
ContextTitle4="---"
ContextAction4=[]
ContextTitle5=Change Text Color
ContextAction5=["#@#Addons\RainRGB4.exe" "VarName=FontColor" "FileName=#@#Variables.inc"]
ContextTitle6="---"
ContextAction6=[]
ContextTitle7="More Actions >>"
ContextAction7=[!SkinMenu]


[Variables]
; Include weather settings and language variables 
@Include1=#@#WeatherComJSONVariables.inc
@Include2=#@#WeatherComJSONMeasures.inc
@Include3=#@#Variables.inc
; Added 'Scale' variable used in the new mouse action bangs below 
Scale=1.05
Index=1
Count=5
Wait=25

--------------------------------------------------------

[FontList]
Measure=Plugin
Plugin=RunCommand
Parameter=reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /s
State=Hide
OutputType=ANSI
Timeout=5000
RegExpSubstitute=1
Substitute="(?si)(?:^.*\\Fonts(?=\R)|(?<=\n)\h*|(?: \(\S*Type\)|REG_SZ)\N*|(?<=\N)\R*$)":""
FinishAction=[!UpdateMeasureGroup FontListGroup][!UpdateMeter FontName][!Redraw]
DynamicVariables=1

[FontCountFormula]
Group=FontListGroup
Measure=String
String="[FontList]"
UpdateDivider=-1
RegExpSubstitute=1
Substitute="\N":"","\R":"+1"
DynamicVariables=1

[FontCount]
Group=FontListGroup
Measure=Calc
Formula=[FontCountFormula]
UpdateDivider=-1
DynamicVariables=1

[FontFace]
Group=FontListGroup
Measure=String
String="[FontList]"
UpdateDivider=-1
RegExpSubstitute=1
Substitute="(?si)^(?:\R\N*){[#FontIndex]}\R(\N*).*$":"[\x200B]\1[\x200B]","#Cleaner#"
DynamicVariables=1

[CurrentTemperatureF]
; Added to 'Times' group so it is enabled when the webparser finishes
Group=Times
Measure=Calc
Formula=(([@CurrentTemperature]*9/5)+32)
DynamicVariables=1
Disabled=1

[Slider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Slide, #Wait#, #Count# | Wait #Wait#
ActionList2=Repeat Slide, #Wait#, #Count# | Wait #Wait# | Rerun | Wait #Wait#
Slide=[!SetVariable Index (Clamp(#Index#+1,1,#Count#))][!UpdateMeasure Slider][!UpdateMeter *][!Redraw]
Rerun=[!SetVariable Index 0][!UpdateMeasure Slider][!CommandMeasure Slider "Stop 1"][!CommandMeasure Slider "Stop 2"][!CommandMeasure Slider "Execute 2"]
UpdateDivider=-1
DynamicVariables=1

; [FontName]
; Meter=String
; X=(5)
; Y=(5)
; FontFace=Consolas
; FontColor=#FontColor#
; StringEffect=Shadow
; FontEffectColor=0,0,0,50
; SolidColor=0,0,0,255
; FontSize=16
; AntiAlias=1
; Text=*
; UpdateDivider=-1
; MouseScrollUpAction=[!SetVariable FontIndex (([FontCount]+#FontIndex#+1)%[FontCount])][!WriteKeyValue Variables FontIndex "[#FontIndex]" "#@#Variables.inc"][!UpdateMeasure FontFace][!UpdateMeter *][!Redraw]
; MouseScrollDownAction=[!SetVariable FontIndex (([FontCount]+#FontIndex#-1)%[FontCount])][!WriteKeyValue Variables FontIndex "[#FontIndex]" "#@#Variables.inc"][!UpdateMeasure FontFace][!UpdateMeter *][!Redraw]
; DynamicVariables=1

[FontName]
Meter=Image
X=(5)
Y=(5)
ImageName=#@#Images\#Index#.png
UpdateDivider=-1
MouseOverAction=[!CommandMeasure Slider "Stop 1"][!CommandMeasure Slider "Stop 2"][!CommandMeasure Slider "Execute 1"]
MouseLeaveAction=[!CommandMeasure Slider "Stop 1"][!CommandMeasure Slider "Stop 2"][!SetVariable Index 1][!UpdateMeasure Slider][!UpdateMeter *][!Redraw]
MouseScrollUpAction=[!SetVariable FontIndex (([FontCount]+#FontIndex#+1)%[FontCount])][!WriteKeyValue Variables FontIndex "[#FontIndex]" "#@#Variables.inc"][!UpdateMeasure FontFace][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable FontIndex (([FontCount]+#FontIndex#-1)%[FontCount])][!WriteKeyValue Variables FontIndex "[#FontIndex]" "#@#Variables.inc"][!UpdateMeasure FontFace][!UpdateMeter *][!Redraw]
DynamicVariables=1

[MeterTemperature]
MeasureName=@CurrentTemperature
MeasureName2=CurrentTemperatureF
;MeasureName2=@UnitsTemperature
Meter=String
X=(5*#Scale#)R
Y=(5*#Scale#)R
FontFace=[FontFace]
FontSize=(55*#Scale#)
FontColor=#FontColor#
StringStyle=Normal
StringAlign=Left
StringEffect=Shadow
FontEffectColor=0,0,0,50
Antialias=1
DynamicVariables=1
Text=%1°C / %2°F
; Added to change the text size by scrolling the mouse wheel up or down
SolidColor=0,0,0,1
MiddleMouseUpAction=[!ToggleMeter FontName][!Redraw]
MouseScrollUpAction=[!SetVariable Scale (Clamp(#Scale#+0.05,0.1,3))][!WriteKeyValue Variables Scale (Clamp(#Scale#+0.05,0.1,3))][!UpdateMeter MeterTemperature][!Redraw]
MouseScrollDownAction=[!SetVariable Scale (Clamp(#Scale#-0.05,0.1,3))][!WriteKeyValue Variables Scale (Clamp(#Scale#-0.05,0.1,3))][!UpdateMeter MeterTemperature][!Redraw]
BasicDualTemperature_2.0.0.rmskin
I changed a few things related to positioning to make the icon / text system more stable and not overlapping one another when changing the size on scroll, and added the animation in both forms (endless and on mouse hover).

So:
- the commented [FontName] is the "old" textual one, i.e. the *
- the uncommented [FontName] is the graphic one, which is endlessly animated through the Slider related bangs in the OnRefreshAction from the [Rainmeter] section, animation that stops when first hovering over the image making place for the "on demand" one using the MouseOverAction / MouseLeaveAction options from the meter
- obviously, removing or commenting one or the other, or even both, will remove the respective animation(s) as well, basically turning the whole thing into a static image if both are left out (the places to look at and that trigger stuff are the OnRefreshAction and the Mouse Over/Leave Actions, like explained above)
- all is done using just one measure ([Slider]) and one meter (the uncommented [FontName])
- I added 3 more variables, Index (the current image index and "name"), Count (the maximum image index and "name") and Wait (the number of milliseconds between one "frame" and the next in the animation)
- you control the type of animation by using the corresponding number in the [!CommandMeasure Slider "Execute N"] bang(s); N = 1 means on demand animation (e.g. one iteration from 1.png to Count.png), while N = 2 means endless animation (e.g. endless iterations from 1.png to Count.png)
- the "Stop" commands to the Slider are necessary for proper functionality, try to leave them just before the "Execute" ones
- naturally, you should have Count images, more or less numerically named, in the Images subfolder in @Resources (yes, you can replace the existing ones, they are there just for testing purposes)

Reference: the ActionTimer plugin.

P.S. Rainmeter doesn't support animated GIFs, although a somewhat similar functionality is present by using a Bitmap meter (basically an image made of all the frames in the animation, placed as a "mozaic", aka sequentially one after another in the image; that requires a bit of photoshopping, obviously, but nothing complicated).
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
MourningStar
Posts: 300
Joined: June 12th, 2016, 2:40 am

Re: My First Skin Help

Post by MourningStar »

^
OK - install failed, need latest RM version. Apparently a version change occurred. Thought this app was supposed to spit out a 'update available' smoke-signal. standby ...

:confused: