It is currently March 28th, 2024, 5:48 pm

Simple Talking Clock 2.0 with Mute

Clocks and timer skins
Post Reply
rickgooj
Posts: 2
Joined: January 29th, 2017, 3:57 pm

Simple Talking Clock 2.0 with Mute

Post by rickgooj »

Very Simple talking Clock that uses 2 plugins both supplied by Windows 10 and the latest version of Rainmeter.
Version 2.0 only uses 1 wav file for the chime. The rest of the voices are produced by Window's SpeakFromIni.exe plugin.
You can also mute the clock by clicking the mute label on the skin.
You can get the full download and install in the link below.
http://rickgooj.deviantart.com/art/Rick-s-Simple-Talking-Clock-2-0-660653657?ga_submit_new=10%3A1485832720



Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Name=Rick's Simple Talking Clock 2.5
Author=Rick Gouge
Information= Uses 2 plugins both supplied in Windows 10 and the Lasted RainMeter
License=Free for all
Version=2.0.0

DynamicWindowSize = 1
BackgroundMode=3
BackgroundMargins=0,34,0,14
:BackgroundMargins=0,10,0,20
;----------------------------------------------------------------------
Variables
;----------------------------------------------------------------------

[Variables]

;-- UnMuted default value
MuteState=0  

;-- Click Label for Mute Default value --
Mute = Mute!

;-- Mute and UnMute Background colors --
MuteColor=255,0,0,75
ActiveColor=0,128,0,75

;-- Row Dimensions --
Width = 400
Height =75

;-- Variables for playing Chime and Voices --
DelayTime = 2500
ChimeFile = [Play "@Sounds\HourChime.wav"]
VoiceText = The time is now

;-- Row 1 --
Title = Simple Talking Clock 3.5
TitleFont = Freestyle Script
TitleFontSize = 30
TitleFontcolor = 200,200,200
FirstRowYDistance = 20

;-- Row 2 --
TimeFont = Arial
TimeFontSize = 50
TimeFontColor = 255,255,255
SecondRowYDistance = 80

;-- Row 3 --
DateFont = Arial
DateFontSize = 20
DateFontColor = 255, 255, 200
ThirdRowYDistance = 175

;----------------------------------------------------------------------
Background settings
;----------------------------------------------------------------------

[MeterBackground]
; background box color and size
Meter=Image
W=#Width#
H=(#Height# * 3)
SolidColor=#ActiveColor#

;----------------------------------------------------------------------
1st Row-Header or title text set by variable Title 
;----------------------------------------------------------------------

[TitleStyle]
FontFace=#TitleFont#
FontSize=#TitleFontSize#
FontColor=#TitleFontcolor#
StringAlign=Center
StringCase=
StringStyle=Bold
StringEffect=shadow
FontEffectColor=
AntiAlias=1

[MeterTitle]
Meter=String
MeterStyle=TitleStyle
Text=#title#
X=(#Width# / 2) 
Y=#FirstRowYDistance#
W=#Width#
H=#Height# 
Text=%

;----------------------------------------------------------------------
2nd Row-Get the Hour and Minute and display them
;----------------------------------------------------------------------

[MeasureTime]
; This measure returns the time in a 24-hour format (i.e. HH:MM).
Measure=Time
Format= %#I:%M %p
; For a 12-hour clock, change the Format option above to: %I:%M %p

[styleTime]
FontFace=#TimeFont#
FontColor=#TimeFontColor#
StringAlign=Center
StringCase=
StringStyle=
StringEffect=shadow
FontEffectColor=0,0,0,50
FontSize=#TimeFontSize#
AntiAlias=1
ClipString=1

[MeterTime]
Meter=String
MeterStyle=styleTime
;Using MeterStyle=styleTitle will basically "copy" the
contents of the [styleTime] section here during runtime.
MeasureName=MeasureTime
X=(#Width# / 2) 
Y=#SecondRowYDistance#
W=#Width#
H=#Height#
Text=%1
; %1 stands for the value of MeasureName (measureTime in this case).

;----------------------------------------------------------------------
3rd Row-Get the Day and the Date and display them
;----------------------------------------------------------------------

[MeasureDate]
Measure=Time
Format=%A  %B %#d, %Y

[styleDate]
FontFace=#DateFont#
FontColor=#DateFontColor#
StringAlign=Center
StringCase=
StringStyle=
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontSize=#DateFontSize#
AntiAlias=1
ClipString=1

[MeterDate]
Meter=String
MeterStyle=styleDate
MeasureName=MeasureDate
X=(#Width# / 2) 
Y=#ThirdRowYDistance#
W=#Width#
H=#Height#
Text=%1
; %1 stands for the value of MeasureName (measureDate in this case).

;---------------------------------------------------------------------
; This section plays the chime.wav, then uses SpeakFromIni.exe to voice the variable #VoiceText#, it then voices the current time from [MeasureTime]
; This section also measures the time in minutes and the mute state, if both  mutestate and minute = 0,The bang is triggered.
; No downloads of plugins needed With Windows 10 and the latest version of Rainmeter
;--------------------------------------------------------------------

[MeasureTopOfTheHour]
Measure=time
Format= %M

[MeasureMutetatus]
Measure=Calc
Formula= (MeasureTopOfTheHour + MuteStateToVar)
IfEqualValue=0
IfEqualAction=[!CommandMeasure ChimePlay "Stop 1"][!CommandMeasure ChimePlay "Execute 1"]

[ChimePlay]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Play1 | Wait #DelayTime# | Play2
Play1=#ChimeFile#
Play2=["#ADDONSPATH#SpeakFromIni\SpeakFromIni.exe" "#VoiceText# [MeasureTime]"]

;---------------------------------------------------------------------
; This section toggles Mute via the mouse action  -- it changes value of Mutestate to 1 or 0, and changes the Background color and mute text
;--------------------------------------------------------------------

[MuteStateToVar]
 Measure=String
 String=#MuteState#
 DynamicVariables=1
 IfMatch=0
 IfMatchAction=[!SetVariable MuteStateBang "[!SetOption MeterBackground SolidColor #MuteColor#][!UpdateMeter MeterBackground][!SetVariable Mute UnMute!][!SetVariable MuteState 1]"]
 IfNotMatchAction=[!SetVariable MuteStateBang "[!SetOption MeterBackground SolidColor #ActiveColor#][!UpdateMeter MeterBackground][!SetVariable Mute Mute!][!SetVariable MuteState 0][!Redraw]"]
 IfMatchMode=1


[Text]
 Meter=String
 FontSize=10
 Antialias=1
 SolidColor=0,0,0,1
 Text=#Mute#
 FontColor=#TitleFontcolor#
 LeftMouseUpAction=#MuteStateBang#
 DynamicVariables=1

Post Reply