It is currently September 20th, 2019, 9:15 pm

chimes

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

Re: chimes

balala » June 8th, 2016, 4:34 pm

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

steve62254 » June 8th, 2016, 5:06 pm

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

Re: chimes

balala » June 8th, 2016, 5:44 pm

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

steve62254 » June 8th, 2016, 7:47 pm

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

Re: chimes

balala » June 8th, 2016, 7:51 pm

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

steve62254 » June 9th, 2016, 2:08 pm

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: 19467
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: chimes

jsmorley » June 9th, 2016, 2:13 pm

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

steve62254 » June 12th, 2016, 4:01 am

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

types140 » June 18th, 2016, 8:05 am

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: