playing sounds with personnalised file operations

Features wanted...
cslevine
Posts: 62
Joined: 15 May 2013 12:26

playing sounds with personnalised file operations

Post by cslevine »

it would be very useful if, when long files copying move operations :
1. a (custom) wave sound was played at the end, so that we know when a backup / copy is completed
2. a (custom) wave sound for name collisions ask, so that no more upseting when come back near the computer
and had a recovery name question at only 2 minutes of an hour copy !

( and, after some first release, it should be good to have some ending sound for short and another sound for long operations :wink: )

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: playing sounds with personnalised file operations

Post by serendipity »

cslevine wrote:it would be very useful if, when long files copying move operations :
1. a (custom) wave sound was played at the end, so that we know when a backup / copy is completed
2. a (custom) wave sound for name collisions ask, so that no more upseting when come back near the computer
and had a recovery name question at only 2 minutes of an hour copy !

( and, after some first release, it should be good to have some ending sound for short and another sound for long operations :wink: )
Sure you can, but have to use a script.
Paste this is addressbar:

Code: Select all

::help "idh_scripting_comref.htm#idh_sc_sound";

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

Re: playing sounds with personnalised file operations

Post by admin »

There are some tweaks for this:

Code: Select all

BJSoundAllDone=
BJSoundAllDuration=0
BJSoundJobDone=
BJSoundJobDuration=0
Some info from the change log:

Code: Select all

    + Tweak to define a sound to be played after the completion of each 
      background job *if* the job was at least of a configurable duration.
        BJSoundJobDone=<full or portable path to a WAV file>
        BJSoundJobDuration=<number of seconds>
      BJSoundJobDuration defines the number of seconds a job has to take 
      at least in order to trigger the sound defined in BJSoundJobDone.
      For example:
        BJSoundJobDone="bum.wav"
        BJSoundJobDuration=66
      Now each background file operation that takes at least 66 seconds 
      would trigger playing "<xypath>\bum.wav" on completion.

    + Tweak to define a minimal duration of all background jobs within 
      one queue until the sound defined in BJSoundAllDone is played.
        BJSoundAllDuration=<number of seconds>

    + Tweak to define a sound to be played when all pending background 
      jobs are completed.
        BJSoundAllDone=<full or portable path to a WAV file>
      FYI, a "portable path" supports environment variables and native 
      variables, and, if not full, is resolved relative to app path.
      Note that the sound will be asynchronously (=non-blocking) played 
      one time to its full length and at the current system volume for 
      WAV output. The only way to stop it prematurely would be to 
      execute this script line:
        ::sound; // stop any playing sound
      Hence the tip: choose a short sound! :)

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: playing sounds with personnalised file operations

Post by serendipity »

Sorry, for your point 2. Name collision, sound is not possible. But you can change settings such that on collision it will skip or rename file. This can be done both within configuration and with scripting.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: playing sounds with personnalised file operations

Post by serendipity »

admin wrote:There are some tweaks for this:

Code: Select all

BJSoundAllDone=
BJSoundAllDuration=0
BJSoundJobDone=
BJSoundJobDuration=0
Some info from the change log:

Code: Select all

    + Tweak to define a sound to be played after the completion of each 
      background job *if* the job was at least of a configurable duration.
        BJSoundJobDone=<full or portable path to a WAV file>
        BJSoundJobDuration=<number of seconds>
      BJSoundJobDuration defines the number of seconds a job has to take 
      at least in order to trigger the sound defined in BJSoundJobDone.
      For example:
        BJSoundJobDone="bum.wav"
        BJSoundJobDuration=66
      Now each background file operation that takes at least 66 seconds 
      would trigger playing "<xypath>\bum.wav" on completion.

    + Tweak to define a minimal duration of all background jobs within 
      one queue until the sound defined in BJSoundAllDone is played.
        BJSoundAllDuration=<number of seconds>

    + Tweak to define a sound to be played when all pending background 
      jobs are completed.
        BJSoundAllDone=<full or portable path to a WAV file>
      FYI, a "portable path" supports environment variables and native 
      variables, and, if not full, is resolved relative to app path.
      Note that the sound will be asynchronously (=non-blocking) played 
      one time to its full length and at the current system volume for 
      WAV output. The only way to stop it prematurely would be to 
      execute this script line:
        ::sound; // stop any playing sound
      Hence the tip: choose a short sound! :)
:oops: :oops: :oops:
Sorry about that!

cslevine
Posts: 62
Joined: 15 May 2013 12:26

Re: playing sounds with personnalised file operations

Post by cslevine »

Well, scripts are a good way.... bit o think that the sound feature could be something good if it would be implemanted in the main configuration dialog.
i believe that it could be easy to add in the code ?
( but sometimes it's not )

cslevine
Posts: 62
Joined: 15 May 2013 12:26

Re: playing sounds with personnalised file operations

Post by cslevine »

just tryed to run this script :

BJSoundJobDone="coagula_iss_rcs.wav"
BJSoundJobDuration=1

after have put the wav file into my XYplorer folder, but nothing happens.
Then, i have the message "BJSoundJobDone" is not a valid script command.

So there is nothing to do i think. So this is a whish :-)

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: playing sounds with personnalised file operations

Post by j_c_hallgren »

cslevine wrote:just tryed to run this script :

BJSoundJobDone="coagula_iss_rcs.wav"
BJSoundJobDuration=1

after have put the wav file into my XYplorer folder, but nothing happens.
Then, i have the message "BJSoundJobDone" is not a valid script command.

So there is nothing to do i think. So this is a whish :-)
It's a set of TWEAKs, not a script, ok?
Read up on how to implement a tweak if you're unsure how to do so...
(Tweaks are customizations applied to XYplorer.ini directly, not via GUI)
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

cslevine
Posts: 62
Joined: 15 May 2013 12:26

Re: playing sounds with personnalised file operations

Post by cslevine »

OK thanks !
so i have done and put well in the .ini file, restarted, checked that all was ok,

but after all tryes, it seems to not working.
is there any hidden thing to do for activate all tewaks ?

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: playing sounds with personnalised file operations

Post by serendipity »

cslevine wrote:OK thanks !
so i have done and put well in the .ini file, restarted, checked that all was ok,

but after all tryes, it seems to not working.
is there any hidden thing to do for activate all tewaks ?
Well, you have to tweak like thi:
http://www.xyplorer.com/xyfc/viewtopic.php?f=10&t=3543

Next your wav file should have full path, if you provide only the name XY has no way to know where it is.

Also, don't create new keys, locate the key and add the wav file next to it.

cslevine
Posts: 62
Joined: 15 May 2013 12:26

Re: playing sounds with personnalised file operations

Post by cslevine »

Well, you have to tweak like thi:
viewtopic.php?f=10&t=3543

Next your wav file should have full path, if you provide only the name XY has no way to know where it is.

Also, don't create new keys, locate the key and add the wav file next to it.
yes, i observed these 3 points, and even tryed with a C:\sound.wav hard path
but nothing sounds.
( and anyway my other system sounds are ok from Windows )
Tryed with a wave with very standard mono, 16 bit, 44.1 PCM, and short

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: playing sounds with personnalised file operations

Post by serendipity »

Don't know how to help, tried now and worked for me.
Asking the obvious, did you enable background processing in config's file operations?

cslevine
Posts: 62
Joined: 15 May 2013 12:26

Re: playing sounds with personnalised file operations

Post by cslevine »

Asking the obvious, did you enable background processing in config's file operations?
Yes.
And tryed to put the sound name with and without quotes ""
tryed with back to english language...

i think i should try a custom button sound, with a script, and that maybe it won't sound.

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

Re: playing sounds with personnalised file operations

Post by admin »

Simply paste something like this into the address bar (of course with a file you have):

Code: Select all

sound "F:\Fun\sounds\ted_stranglehold.wav";

cslevine
Posts: 62
Joined: 15 May 2013 12:26

Re: playing sounds with personnalised file operations

Post by cslevine »

Simply paste something like this into the address bar (of course with a file you have):
OK this works well.

Post Reply