It is currently December 1st, 2021, 7:17 pm

ActionSlideClock

Clocks and timer skins
User avatar
jsmorley
Developer
Posts: 22416
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

ActionSlideClock

Post by jsmorley »

Demonstrates both the ActionTimer plugin and the new Container meter option.

ActionSlideClock_2.0.rmskin

GIF.gif

Code: Select all

[Rainmeter]
Update=50
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!SetVariable CurrentHours "[MeasureHours]"][!SetVariable CurrentMinutes "[MeasureMinutes]"][!SetVariable CurrentSeconds "[MeasureSeconds]"][!UpdateMeter *][!Redraw]

[Variables]
LinesColor=0,0,0,255
NumberColor=255,255,255,255
BackColor=19,43,77,255
CurrentHoursY=2
NewHoursY=-40
CurrentMinutesY=2
NewMinutesY=-40
CurrentSecondsY=2
NewSecondsY=-40
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Numbers][!Redraw]

; Measures

[MeasureHours]
Measure=Time
Format=%I
OnChangeAction=[!CommandMeasure HoursSlide "Execute 1"]

[MeasureMinutes]
Measure=Time
Format=%M
OnChangeAction=[!CommandMeasure MinutesSlide "Execute 1"]

[MeasureSeconds]
Measure=Time
Format=%S
OnChangeAction=[!CommandMeasure SecondsSlide "Execute 1"]

[HoursSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
IgnoreWarnings=1
ActionList1=SetThem | Wait 1 | Repeat SlideThem, 20, 21 | Wait 1| SwapThem
SetThem=[!SetVariable CurrentHoursY "2"][!SetVariable NewHoursY "-40"]#U#
SlideThem=[!SetVariable CurrentHoursY "(Clamp(#CurrentHoursY#+2,2,45))"][!SetVariable NewHoursY "(Clamp(#NewHoursY#+2,-40,2))"]#U#
SwapThem=[!SetVariable CurrentHoursY "2"][!SetVariable NewHoursY "-40][!SetVariable CurrentHours "[MeasureHours]"]#U#
UpdateDivider=-1
DynamicVariables=1

[MinutesSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
IgnoreWarnings=1
ActionList1=SetThem | Wait 1 | Repeat SlideThem, 20, 21 | Wait 1| SwapThem
SetThem=[!SetVariable CurrentMinutesY "2"][!SetVariable NewMinutesY "-40"]#U#
SlideThem=[!SetVariable CurrentMinutesY "(Clamp(#CurrentMinutesY#+2,2,45))"][!SetVariable NewMinutesY "(Clamp(#NewMinutesY#+2,-40,2))"]#U#
SwapThem=[!SetVariable CurrentMinutesY "2"][!SetVariable NewMinutesY "-40][!SetVariable CurrentMinutes "[MeasureMinutes]"]#U#
UpdateDivider=-1
DynamicVariables=1

[SecondsSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
IgnoreWarnings=1
ActionList1=SetThem | Wait 1 | Repeat SlideThem, 20, 21 | Wait 1| SwapThem
SetThem=[!SetVariable CurrentSecondsY "2"][!SetVariable NewSecondsY "-40"]#U#
SlideThem=[!SetVariable CurrentSecondsY "(Clamp(#CurrentSecondsY#+2,2,45))"][!SetVariable NewSecondsY "(Clamp(#NewSecondsY#+2,-40,2))"]#U#
SwapThem=[!SetVariable CurrentSecondsY "2"][!SetVariable NewSecondsY "-40][!SetVariable CurrentSeconds "[MeasureSeconds]"]#U#
UpdateDivider=-1
DynamicVariables=1

; Meters

[MeterContainer]
Meter=Shape
Shape=Rectangle 1,1,126,43 | StrokeWidth 2
UpdateDivider=-1

[MeterNewHours]
Meter=String
Group=Numbers
MeasureName=MeasureHours
W=30
H=32
X=22
Y=#NewHoursY#
StringAlign=Center
FontFace=Fira Sans
FontSize=20
FontColor=#NumberColor#
SolidColor=#BackColor#
Padding=5,5,5,5
AntiAlias=1
Container=MeterContainer
UpdateDivider=-1
DynamicVariables=1

[MeterCurrentHours]
Meter=String
Group=Numbers
W=30
H=32
X=22
Y=#CurrentHoursY#
StringAlign=Center
FontFace=Fira Sans
FontSize=20
FontColor=#NumberColor#
SolidColor=#BackColor#
Padding=5,5,5,5
AntiAlias=1
Text=#CurrentHours#
Container=MeterContainer
UpdateDivider=-1
DynamicVariables=1

[MeterNewMinutes]
Meter=String
Group=Numbers
MeasureName=MeasureMinutes
W=30
X=64
Y=#NewMinutesY#
H=32
StringAlign=Center
FontFace=Fira Sans
FontSize=20
FontColor=#NumberColor#
SolidColor=#BackColor#
Padding=5,5,5,5
AntiAlias=1
Container=MeterContainer
UpdateDivider=-1
DynamicVariables=1

[MeterCurrentMinutes]
Meter=String
Group=Numbers
MeasureName=MeasureMinutes
W=30
X=64
Y=#CurrentMinutesY#
H=32
StringAlign=Center
FontFace=Fira Sans
FontSize=20
FontColor=#NumberColor#
SolidColor=#BackColor#
Padding=5,5,5,5
AntiAlias=1
Text=#CurrentMinutes#
Container=MeterContainer
UpdateDivider=-1
DynamicVariables=1

[MeterNewSeconds]
Meter=String
Group=Numbers
MeasureName=MeasureSeconds
W=30
X=106
Y=#NewSecondsY#
H=32
StringAlign=Center
FontFace=Fira Sans
FontSize=20
FontColor=#NumberColor#
SolidColor=#BackColor#
Padding=5,5,5,5
AntiAlias=1
Container=MeterContainer
UpdateDivider=-1
DynamicVariables=1

[MeterCurrentSeconds]
Meter=String
Group=Numbers
W=30
X=106
Y=#CurrentSecondsY#
H=32
StringAlign=Center
FontFace=Fira Sans
FontSize=20
FontColor=#NumberColor#
SolidColor=#BackColor#
Padding=5,5,5,5
AntiAlias=1
Text=#CurrentSeconds#
Container=MeterContainer
UpdateDivider=-1
DynamicVariables=1

[MeterOutline]
Meter=Shape
Shape=Rectangle 1,1,126,43 | StrokeWidth 2 | Stroke Color #LinesColor# | Fill Color 0,0,0,0
Shape2=Line 43,2,43,43 | StrokeWidth 2 | Stroke Color #LinesColor#
Shape3=Line 85,2,85,43 | StrokeWidth 2 | Stroke Color #LinesColor#
UpdateDivider=-1

This can be changed to 24-hour time by simply changing [MeasureHours] from Format=%I to Format=%H.

Note that the Update of the skin is set very low. This is to ensure that the skin reacts to the change in the value of seconds, minutes, hours, as soon after they actually change as possible, eliminating any "lag". The only measures or meters that are running at this rapid pace are the three Time measures, the rest of the skin will only be updated when those values change.
You do not have the required permissions to view the files attached to this post.
ThatOneDevil
Posts: 2
Joined: September 16th, 2021, 4:12 pm

Re: ActionSlideClock

Post by ThatOneDevil »

For some reason whenever I try to install the .rmskin I get an error saying Unable to create file: C:\Users\NAME\OneDrive\Documents\Rainmeter\Skins\ActionSlideClock\ActionSlideClock.ini
Skin installer will now quit. Click OK to close Skin installer.
User avatar
CyberTheWorm
Posts: 801
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: ActionSlideClock

Post by CyberTheWorm »

ThatOneDevil wrote: September 16th, 2021, 4:15 pm For some reason whenever I try to install the .rmskin I get an error saying Unable to create file: C:\Users\NAME\OneDrive\Documents\Rainmeter\Skins\ActionSlideClock\ActionSlideClock.ini
Skin installer will now quit. Click OK to close Skin installer.
Just tested and it installs fine for me nice jsmorley
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
balala
Rainmeter Sage
Posts: 13511
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ActionSlideClock

Post by balala »

CyberTheWorm wrote: September 16th, 2021, 4:54 pm Just tested and it installs fine for me
For me too.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1669
Joined: March 23rd, 2015, 5:26 pm

Re: ActionSlideClock

Post by SilverAzide »

ThatOneDevil wrote: September 16th, 2021, 4:15 pm For some reason whenever I try to install the .rmskin I get an error saying Unable to create file: C:\Users\NAME\OneDrive\Documents\Rainmeter\Skins\ActionSlideClock\ActionSlideClock.ini
Skin installer will now quit. Click OK to close Skin installer.
The problem is revealed in your error message:

C:\Users\NAME\OneDrive\Documents\Rainmeter\Skins\ActionSlideClock\ActionSlideClock.ini

Don't install skins there. If needed, edit Rainmeter.ini and in the {Rainmeter] section add a line to point your skins path someplace else:

Code: Select all

[Rainmeter]
SkinPath=X:\some_other_location_thats_not_onedrive\Rainmeter\Skins\
...
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 13511
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ActionSlideClock

Post by balala »

SilverAzide wrote: September 16th, 2021, 9:06 pm Don't install skins there. If needed, edit Rainmeter.ini and in the {Rainmeter] section add a line to point your skins path someplace else:

Code: Select all

[Rainmeter]
SkinPath=X:\some_other_location_thats_not_onedrive\Rainmeter\Skins\
...
Even if it does work with any valid path, the used path should point to the Documents folder of the user's machine, whatever that path would be. It's not always and absolutely necessary the C:\Users\YourName\Documents\Rainmeter\Skins, but for sure it's a good idea to be within the Documents folder.
User avatar
jsmorley
Developer
Posts: 22416
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ActionSlideClock

Post by jsmorley »

While it's a good practice to have "normal" installations of Rainmeter store skins in your Windows-based "Documents" folder, it's certainly not a requirement. Skins can be stored anywhere that your account has full, unfettered read-write access to.

Simply "Edit Settings", and change the default location for the option SkinPath in the [Rainmeter] section of Rainmeter.ini. Then save the file, exit Rainmeter, move the skins to the new location, and restart Rainmeter.

The only parts of Rainmeter that must be in a particular location for a "normal" installation are the "program" location, that will be forced to your %PROGRAMFILES%\Rainmeter folder, and the "settings" location that will be forced to your %APPDATA%\Rainmeter folder. Rainmeter will default to putting skins in your personal Documents folder, but really doesn't insist on it.

So based on what I have seen so far, I don't see any issue with storing skins in a OneDrive folder, assuming again that your account has read-write access to the folder. It's not an unreasonable idea to have your skins somewhere there is automatically "backed up" to the cloud. However, if you get any UAC prompt when trying to copy/delete/edit a file in that folder, then you should not use that folder for the skins for Rainmeter.

Note that you CAN store your skins in a folder your account doesn't have unfettered write access to, but if that is the case, you won't be able to install .rmskin files with Rainmeter, and all your skins will be "read-only" as far as Rainmeter is concerned. I know folks have done this to "share" skins on a network server in a business environment, but I really, really don't recommend this...

I don't use OneDrive, so if there is some particular issue with using it for this, please let me know. I suppose it is possible that deleting and creating folders or files in that might cause them to be "locked" in some way while the OneDrive "sync" background process deals with them.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1669
Joined: March 23rd, 2015, 5:26 pm

Re: ActionSlideClock

Post by SilverAzide »

balala wrote: September 17th, 2021, 4:03 pm Even if it does work with any valid path, the used path should point to the Documents folder of the user's machine, whatever that path would be. It's not always and absolutely necessary the C:\Users\YourName\Documents\Rainmeter\Skins, but for sure it's a good idea to be within the Documents folder.
Nope, sorry... not correct in this case. That's why I wrote what I did.
jsmorley wrote: September 17th, 2021, 4:12 pm I don't use OneDrive, so if there is some particular issue with using it for this, please let me know. I suppose it is possible that deleting and creating folders or files in that might cause them to be "locked" in some way while the OneDrive "sync" background process deals with them.
Well, I can tell you for sure something is really wacky with OneDrive. My company started using a corporate OneDrive account as a backup, and has somehow, and super-annoyingly, repointed a bunch of folders like C:\Users\usename\Documents, and more to a cloud drive. I have no idea how they are doing this (its not a junction or symlink that I can see, it's like some OS-level policy thing). But however it works, it has Rainmeter -- and a lot of other apps -- hosed up. Part of the issue is this, at least on my machine:
Screenshot 2021-09-17 132826.png
Notice I have two Documents folders! One is "real" and one is a OneDrive "cloud" thing. The "real" one doesn't really work (there's nothing in it because something moves everything you put there to the cloud), the other one works but the files are someplace else. When a default Rainmeter install looks for the standard skin folder, it sees there's nothing there and it tries to create it and load Illustro. But that folder is hosed up somehow and it can't put the skins there to load them, so you end up in the state where Rainmeter has nothing to load.

The only solution I've found is as I stated above: move the skins folder someplace completely out of any OneDrive-replicated folder or anything re-directing to it. I don't know if this situation is specific to me or not, or if this business OneDrive is somehow different than the consumer OneDrive, but this has been my (unfortunate) experience so far.
You do not have the required permissions to view the files attached to this post.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 13511
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ActionSlideClock

Post by balala »

SilverAzide wrote: September 17th, 2021, 5:44 pm Nope, sorry... not correct in this case.
What is not correct?
User avatar
jsmorley
Developer
Posts: 22416
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ActionSlideClock

Post by jsmorley »

SilverAzide wrote: September 17th, 2021, 5:44 pm Nope, sorry... not correct in this case. That's why I wrote what I did.


Well, I can tell you for sure something is really wacky with OneDrive. My company started using a corporate OneDrive account as a backup, and has somehow, and super-annoyingly, repointed a bunch of folders like C:\Users\usename\Documents, and more to a cloud drive. I have no idea how they are doing this (its not a junction or symlink that I can see, it's like some OS-level policy thing). But however it works, it has Rainmeter -- and a lot of other apps -- hosed up. Part of the issue is this, at least on my machine:

Screenshot 2021-09-17 132826.png

Notice I have two Documents folders! One is "real" and one is a OneDrive "cloud" thing. The "real" one doesn't really work (there's nothing in it because something moves everything you put there to the cloud), the other one works but the files are someplace else. When a default Rainmeter install looks for the standard skin folder, it sees there's nothing there and it tries to create it and load Illustro. But that folder is hosed up somehow and it can't put the skins there to load them, so you end up in the state where Rainmeter has nothing to load.

The only solution I've found is as I stated above: move the skins folder someplace completely out of any OneDrive-replicated folder or anything re-directing to it. I don't know if this situation is specific to me or not, or if this business OneDrive is somehow different than the consumer OneDrive, but this has been my (unfortunate) experience so far.
Oh, yike... So I guess the original suggestion to NOT use any OneDrive folder for skins is a good one.