Hi everyone!
This is mi first post, I am a long time Rainmeter user, not a skin creator, but confident with Rainmeter and skins configuration files. My question is the following: is it possible to make Rainmeter play a sound automatically as soon as a layout is loaded?
I know about the Play bang (not !Play, I know), but I couldn't get it to work for me. What I want to achieve is:
1. Rainmeter is closed, or PC is off.
2. Rainmeter starts, loads the layout, and play a sound.
I mean: it plays a sound automatically like a sort of "intro", without mouse clicks or user interaction. I would like to achieve this:
1. Or with a shortcut, with a command line parameter
2. Or attaching the Play bang to a section of a skin that is loaded when Rainmeter starts.
I hope someone can help me.
Cheers,
AlphaUMi
It is currently March 29th, 2023, 10:30 am
Play a sound when Rainmeter starts
-
- Posts: 5
- Joined: June 13th, 2018, 4:17 pm
- Location: 127.0.0.1
Play a sound when Rainmeter starts
"Vitam impendere vero"
-
- Developer
- Posts: 22564
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Play a sound when Rainmeter starts
Code: Select all
[MeasureOnLoad]
Measure=Calc
Formula=Counter
IfCondition=MeasureOnLoad = 1
IfTrueAction=[Play "#@#\Sounds\Wecome2.wav"]
UpdateDivider=-1
You do not have the required permissions to view the files attached to this post.
-
- Posts: 5
- Joined: June 13th, 2018, 4:17 pm
- Location: 127.0.0.1
Re: Play a sound when Rainmeter starts
Oh yes, thank you! Really, sincerely, thank you a lot!!!
And in the process I've learned the MeasureOnLoad... it's great, very useful. Thank you again!!!

And in the process I've learned the MeasureOnLoad... it's great, very useful. Thank you again!!!

"Vitam impendere vero"
-
- Developer
- Posts: 22564
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Play a sound when Rainmeter starts
Glad to help.
-
- Posts: 3
- Joined: October 12th, 2022, 11:41 am
Re: Play a sound when Rainmeter starts
Hi friend could you help me please? I have a problem in Raimeter with Measure as in Post but I would like a Measure script command for a sound when closing a Rainmeter skin. If you can help me thank you. I can't wait then. Have a good day.
-
- Rainmeter Sage
- Posts: 5045
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Play a sound when Rainmeter starts
Use OnCloseAction in the [Rainmeter] section of the skin to play your sound.remoberserker wrote: ↑October 12th, 2022, 12:05 pm Hi friend could you help me please? I have a problem in Raimeter with Measure as in Post but I would like a Measure script command for a sound when closing a Rainmeter skin. If you can help me thank you. I can't wait then. Have a good day.
This assumes your sound wav file is located in {YourSkinFolder}\@Resources\Sounds.
Code: Select all
[Rainmeter]
OnCloseAction=[Play "#@#\Sounds\GoodBye.wav"]
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 3
- Joined: October 12th, 2022, 11:41 am
Re: Play a sound when Rainmeter starts
Thanks for responding so quickly buddy but it didn't work universally. I'm using SkinPacks.com Mortal Kombat Premium Theme with RocketDock and Rainmeter with Haunted Skin I think?!? the command in the skin script with the folders above for the .wav sound and when deactivating the skin it did not play the sound. I'm a beginner in this so if you can please help me with the entire shutdown script like the one in the post above forgive the skin because I don't know how to use OnCloseAction and I can't get the option in my skin's script. Please help me friend and sorry to bother you again. Thanks again.
-
- Rainmeter Sage
- Posts: 15071
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Play a sound when Rainmeter starts
You don't bother anyone, we're helping here only willingly, so don't worry.remoberserker wrote: ↑October 12th, 2022, 11:40 pm Thanks for responding so quickly buddy but it didn't work universally. I'm using SkinPacks.com Mortal Kombat Premium Theme with RocketDock and Rainmeter with Haunted Skin I think?!? the command in the skin script with the folders above for the .wav sound and when deactivating the skin it did not play the sound. I'm a beginner in this so if you can please help me with the entire shutdown script like the one in the post above forgive the skin because I don't know how to use OnCloseAction and I can't get the option in my skin's script. Please help me friend and sorry to bother you again.
To do what eclectic-tech described, when the skin you want to add the sound playing on close is on the screen, right click it. In the opening menu click Edit skin. The code of the skin opens in the default text editor. Locate the [Rainmeter] section. It usually is at the beginning of the code, but not necessarily. If you found it see if it has an OnCloseAction option. Most probably it has not, because from my experience I can say there are few skins using such an option, however it might be there. If there is no OnCloseAction, add the option posted by eclectic-tech under the [Rainmeter] section. If there is an OnCloseAction, add his bang ([Play "#@#\Sounds\GoodBye.wav"]) anywhere in the option, next to the existing ones. In the end save the file and refresh the skin (right click it and click Refresh skin). When you did this, you should get the sound playing when you're closing the skin.
Take care to modify the path and the name of the sound file under the Play bang, to the proper one. The #@# variable is representing the @Resources folder of your config. It's recommended and a good practice to place all resources files (for instance images and sound, but not just) to this @Resources folder. To use eclectic-tech's example, you have to have a GoodBye.wav file in the @Resorurces\Sound folder. You have to either create this folder, place the wav file into it and rename the file to GoodBye.wav, or another possibility is to replace the path to the proper file, with the proper path.
If you can't get all above working, please post the code of your skin here.
-
- Posts: 3
- Joined: October 12th, 2022, 11:41 am
Re: Play a sound when Rainmeter starts
Thank you friend. I got it thanks to God and to you. I wish you good luck and all the best. Thank you all.
-
- Rainmeter Sage
- Posts: 15071
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Play a sound when Rainmeter starts
Did you got it working now? If you did, I'm glad.