It is currently March 28th, 2024, 9:41 pm

chimes

Discuss the use of Lua in Script measures.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: chimes

Post by balala »

steve62254 wrote:C:\Users\6-22-54\Documents\Rainmeter\Skins\Tutorials
two folders in Tutorials:
1)@Resources\Sounds\.wav files
2)Clock\working on.ini
the system will not let me copy and paste the folder "Tutorials" here
steve
Pack it as an rmskin file. The rmskin file can be uploaded (if it's not too large). Is it large?
User avatar
steve62254
Posts: 15
Joined: June 8th, 2016, 5:15 am

Re: chimes

Post by steve62254 »

try that
steve
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: chimes

Post by balala »

steve62254 wrote:try that
steve
That's ok.
But none of the sounds aren't working, not just the second isn't. That's because in the package the wav files are placed into the Sounds folder, but in the code you used them, like they would be in the Resources folder. To fix this, add a Sounds\ folder name to each IfTrueAction, in the [MeasureChime] measure:

Code: Select all

[MeasureChime]
Measure=Calc
Formula=1
IfCondition=(MeasureMinutes = 0) && (MeasureSeconds = 0)
IfTrueAction=[Play "#@#Sounds\oh-ee-oh.wav"]
IfCondition2=(MeasureMinutes = 15) && (MeasureSeconds = 0)
IfTrueAction2=[Play "#@#Sounds\all_in_good_time.wav"]
IfCondition3=(MeasureMinutes = 30) && (MeasureSeconds = 0)
IfTrueAction3=[Play "#@#Sounds\my_pretty.wav"]
IfCondition4=(MeasureMinutes = 45) && (MeasureSeconds = 0)
IfTrueAction4=[Play "#@#Sounds\lollipop_guild.wav"]
User avatar
steve62254
Posts: 15
Joined: June 8th, 2016, 5:15 am

Re: chimes

Post by steve62254 »

that worked
thanks for your help
steve
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: chimes

Post by balala »

You're welcome. But I don't understand how the [Play "#@#oh-ee-oh.wav"] bang could work, if all the wav files was in the Sounds folder.
User avatar
steve62254
Posts: 15
Joined: June 8th, 2016, 5:15 am

Re: chimes

Post by steve62254 »

when i first put the .wav file in, the first location was in the skins folder but not in the Sounds folder.
i had put these code lines in the .ini file,maybe that was the trigger?

[MeasureChimeHour]
Measure=Time
Format=%M
IfEqualValue=00
IfTrueAction=[PLAY "#@#oh-ee-oh.wav.wav"]

i'm learning this as i go along.
sometimes i have to stop and think do i need to scratch my ass or wind my watch.
is there a "if you what to do this,write this" manual out there ? I've looked on the web site at that one. but i need more details and examples.
thanks
steve
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: chimes

Post by jsmorley »

steve62254 wrote:when i first put the .wav file in, the first location was in the skins folder but not in the Sounds folder.
i had put these code lines in the .ini file,maybe that was the trigger?

[MeasureChimeHour]
Measure=Time
Format=%M
IfEqualValue=00
IfTrueAction=[PLAY "#@#oh-ee-oh.wav.wav"]

i'm learning this as i go along.
sometimes i have to stop and think do i need to scratch my ass or wind my watch.
is there a "if you what to do this,write this" manual out there ? I've looked on the web site at that one. but i need more details and examples.
thanks
steve
;-) There really isn't, since there are an infinite number of "if you what to do this" possibilities.
User avatar
steve62254
Posts: 15
Joined: June 8th, 2016, 5:15 am

Re: chimes

Post by steve62254 »

could someone help me edit this file to play a .wav file at say a given time.
the time format would be hh:mm:ss (04:18:30) or 17:55:00.
=============================[Rainmeter]
Update=1000

[MeasureTime]
Measure=Time
Format=%H:%M:%S


[MeterBackground]
Meter=Image
W=120
H=8
SolidColor=60,60,60,0


[MeterTime]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureTime
X=165
Y=0
FontSize=64


[MeasureChimeHour]
Measure=Time
Format=%M
IfEqualValue=02
IfEqualAction=[Play "#@#Sounds\MY.wav"]
==========================================================
thanks
steve
types140
Posts: 2
Joined: June 11th, 2016, 10:03 pm

Re: chimes

Post by types140 »

Hi steve,

try this one:

Code: Select all

[Rainmeter]
Update=1000

[MeasureTime]
Measure=Time
Format=%H:%M:%S

[MeterBackground]
Meter=Image
W=120
H=8
SolidColor=60,60,60,0

[MeterTime]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureTime
X=165
Y=0
FontSize=64

[MeasureHours]
Measure=Time
Format=%H

[MeasureMinutes]
Measure=Time
Format=%M

[MeasureSeconds]
Measure=Time
Format=%S

[MeasureChime]
Measure=Calc
Formula=1
IfCondition=(MeasureHours = 23) && (MeasureMinutes = 59) && (MeasureSeconds = 59)
IfTrueAction=[Play "#@#Sounds\MY.wav"]
It brings up your sound at 23:59:59
Just replace the numbers in the last IfCondition for your own time!

Take care :welcome: