It is currently March 29th, 2024, 5:23 am

i want auto play a sound file every 30 mins, is possible ?

General topics related to Rainmeter.
Mehrdad.A
Posts: 2
Joined: May 6th, 2020, 6:02 am

i want auto play a sound file every 30 mins, is possible ?

Post by Mehrdad.A »

Hi, i am new here and with help of my friend i created a System Uptime widget for my desktop, and now i want when system uptime reaches 00:30:00 / 01:00:00 / 01:30:00 and 02:00:00 (or every 30 mins) play a sound file. this is possible with Rainmeter ?
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: i want auto play a sound file every 30 mins, is possible ?

Post by mak_kawa »

Hi Mehrdad.A

Just my idea;

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=192,192,192,192

[Variables]
ChimeIntervalMinute=30

[MeasureSystemUpTime]
Measure=UpTime

[MeasureUptimeRemainder]
Measure=Calc
Formula=[MeasureSystemUpTime:] % (#ChimeIntervalMinute#*60)
IfCondition=#CURRENTSECTION#=0
IfTrueAction=[Play chime.wav]
DynamicVariables=1

[mCounter]
Meter=String
MeasureName=MeasureUpTimeRemainder
X=5
Y=5
W=150
H=15
Text=UptimeRemainder: %1
Of course, background setting in [Rainmeter] section, and [mCounter] meter are not necessary for you.
Mehrdad.A
Posts: 2
Joined: May 6th, 2020, 6:02 am

Re: i want auto play a sound file every 30 mins, is possible ?

Post by Mehrdad.A »

mak_kawa wrote: May 6th, 2020, 7:12 am Hi Mehrdad.A

Just my idea;

Hi, it doesnt work :(

but i do it with windows task scheduler.

Thank you :)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: i want auto play a sound file every 30 mins, is possible ?

Post by balala »

Mehrdad.A wrote: May 9th, 2020, 5:15 pm Hi, it doesnt work :(
I doubt. mak_kawa's code is working perfectly.
What have to take care about is to have the chime.wav file near the skin's .ini file. Obviously if it is not there, it can't be played, creating the impression it doesn't work.
So, is that file there?