Page 1 of 1

Turning sound off

Posted: 12 Jul 2023 22:31
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.

Re: Turning sound off

Posted: 12 Jul 2023 22:59
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.

Re: Turning sound off

Posted: 12 Jul 2023 23:44
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.)

Re: Turning sound off

Posted: 18 Jul 2023 11:58
by admin
Next beta. :cup:

Re: Turning sound off

Posted: 18 Jul 2023 14:29
by zakhar
admin wrote: 18 Jul 2023 11:58Next beta. :cup:
It works now!
Thank you, admin! :cup: