It is currently March 29th, 2024, 10:22 am

Stop Sound when unload the skin

Get help with creating, editing & fixing problems with skins
MunaNazzal
Posts: 7
Joined: June 11th, 2017, 4:32 pm

Stop Sound when unload the skin

Post by MunaNazzal »

I am working on a new skin, where the user can play a sound and the sound will loop.
But the problem is, when I unload the skin manually, the sound keeps playing in the background.
How to fix this? Is it possible to stop a looping sound when unload the skin ?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Stop Sound when unload the skin

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[PlayLoop "C:\Windows\Media\ir_end.wav"]
OnCloseAction=[PlayStop]
https://docs.rainmeter.net/manual/skins/rainmeter-section/#OnCloseAction
https://docs.rainmeter.net/manual/bangs/#PlayStop
MunaNazzal
Posts: 7
Joined: June 11th, 2017, 4:32 pm

Re: Stop Sound when unload the skin

Post by MunaNazzal »

jsmorley wrote:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[PlayLoop "C:\Windows\Media\ir_end.wav"]
OnCloseAction=[PlayStop]
https://docs.rainmeter.net/manual/skins/rainmeter-section/#OnCloseAction
https://docs.rainmeter.net/manual/bangs/#PlayStop


Thank you Mr. jsmorley.
the onCloseAction was exactly what I am looking for.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Stop Sound when unload the skin

Post by jsmorley »

Glad to help.