Hi new user here. I've been trying to play a sound whenever my disk drive is opened or when I turn off my computer. I've managed to get the audio to play, but I haven't been able to figure out how to detect anything about the disk drive or shutting down my computer.
I was wondering if rm can even give me that type of information or would I have to use a plugin instead?
It is currently April 25th, 2024, 5:25 pm
Detecting Disk Drive State & Functions on Shutdown
-
- Posts: 2
- Joined: October 10th, 2017, 11:49 pm
-
- Rainmeter Sage
- Posts: 16169
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Detecting Disk Drive State & Functions on Shutdown
What kind of disk drive are you talking about? An optical drive, as CD / DVD?Spec wrote:I've been trying to play a sound whenever my disk drive is opened
Rainmeter can't know when the computer is shut down, but it knows when a skin is unloaded. If you have a very simple skin loaded and you don't unload it (maybe it can have nothing visible), when you shutdown the computer, the above skin is unloaded and you can create an option to play the sound in this case. Are you interested into a such solution?Spec wrote:when I turn off my computer.
-
- Posts: 2
- Joined: October 10th, 2017, 11:49 pm
Re: Detecting Disk Drive State & Functions on Shutdown
An optical drive yes.balala wrote:What kind of disk drive are you talking about? An optical drive, as CD / DVD?
Actually that might be exactly what I need, I'll give you it a whirl.balala wrote: Rainmeter can't know when the computer is shut down, but it knows when a skin is unloaded. If you have a very simple skin loaded and you don't unload it (maybe it can have nothing visible), when you shutdown the computer, the above skin is unloaded and you can create an option to play the sound in this case. Are you interested into a such solution?
EDIT: Would I have to use WebParser to check if a skin is unloaded or is Rainmeter able to detect that by itself?
-
- Rainmeter Sage
- Posts: 16169
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Detecting Disk Drive State & Functions on Shutdown
A while ago I wrote a plugin which reads the state of an optical drive. You find it here: https://forum.rainmeter.net/viewtopic.php?p=131992#p131992Spec wrote:An optical drive yes.
The simplest way to get the plugin, is to download and install the skin posted there. Beside the skin, the installer will also install the appropriate version of the plugin, in the right place. If you're interested, just give a try to the skin, to see what it does. If you find it useful, the next step will be to write the code to play the sound, as you wished.
First try the following code:Spec wrote:Actually that might be exactly what I need, I'll give you it a whirl.
EDIT: Would I have to use WebParser to check if a skin is unloaded or is Rainmeter able to detect that by itself?
Code: Select all
[Rainmeter]
Update=-1
OnCloseAction=[Play "ADD-HERE-THE-NEEDED-WAV-FILE"]
[MeterDumb]
Meter=String