Page 1 of 3

playing sounds with personnalised file operations

Posted: 16 May 2013 17:08
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: )

Re: playing sounds with personnalised file operations

Posted: 16 May 2013 17:11
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";

Re: playing sounds with personnalised file operations

Posted: 16 May 2013 17:23
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! :)

Re: playing sounds with personnalised file operations

Posted: 16 May 2013 17:32
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.

Re: playing sounds with personnalised file operations

Posted: 16 May 2013 17:32
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!

Re: playing sounds with personnalised file operations

Posted: 19 May 2013 10:46
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 )

Re: playing sounds with personnalised file operations

Posted: 19 May 2013 15:37
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 :-)

Re: playing sounds with personnalised file operations

Posted: 19 May 2013 15:58
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)

Re: playing sounds with personnalised file operations

Posted: 19 May 2013 18:06
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 ?

Re: playing sounds with personnalised file operations

Posted: 19 May 2013 18:27
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.

Re: playing sounds with personnalised file operations

Posted: 19 May 2013 19:29
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

Re: playing sounds with personnalised file operations

Posted: 19 May 2013 20:05
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?

Re: playing sounds with personnalised file operations

Posted: 19 May 2013 20:17
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.

Re: playing sounds with personnalised file operations

Posted: 19 May 2013 20:22
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";

Re: playing sounds with personnalised file operations

Posted: 19 May 2013 21:55
by cslevine
Simply paste something like this into the address bar (of course with a file you have):
OK this works well.