Turning sound off

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
zakhar
Posts: 179
Joined: 08 Sep 2010 21:13

Turning sound off

Post by zakhar »

Hello, dear XYplorer Community!

I have a script, that moves files individually to different locations depending on their properties.
The option "Controls & More | Miscellaneous | Play a sound on certain events" is on.

How can I turn the XYplorer sounds off inside of the script for the time of running this script?

I try the command "ces("FOB",,-1);" and the following:

Code: Select all

while(there are files to sort and to move){
    if(criteria 1){
        ces("FOB",,-1); "//keep the soundfile setting but don't play it" - see Help file.
        moveto...;
    }
    if(criteria 2){
        ces("FOB",,-1); "//keep the soundfile setting but don't play it" - see Help file.
        moveto...;
    }
}
echo Done!;
and as result there are two sounds to hear:
1. somewhere directly before or after moving the first file and
2. before or simultaneously with displaying echo or after the last file.

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Turning sound off

Post by jupe »

There is no inbuilt way, I suggested it though when the feature was introduced here: viewtopic.php?p=210894#p210894

What you could do is run a command line app to mute the OS sound globally (or per app), and then unmute when your script is complete.

zakhar
Posts: 179
Joined: 08 Sep 2010 21:13

Re: Turning sound off

Post by zakhar »

Thank you, jupe!
The pair of 'setting "PlayEventSounds",0;' for turning sounds off and 'setting "PlayEventSounds",1' for turning on
or something like that would be good.
(Edit: grammar.)

admin
Site Admin
Posts: 66098
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Turning sound off

Post by admin »

Next beta. :cup:

zakhar
Posts: 179
Joined: 08 Sep 2010 21:13

Re: Turning sound off

Post by zakhar »

admin wrote: 18 Jul 2023 11:58Next beta. :cup:
It works now!
Thank you, admin! :cup:

Post Reply