How to add a sound to a custom toolbar button?

Discuss and share scripts and script files...
Post Reply
ghost zero
Posts: 842
Joined: 26 Apr 2010 17:48

How to add a sound to a custom toolbar button?

Post by ghost zero »

How can I add a sound to a custom toolbar button? What is the script for it?

BTW: I want to insert it into and existing script. Anything special I have to type inbetween?

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

Re: How to add a sound to a custom toolbar button?

Post by serendipity »

Command sound:

Code: Select all

::help "idh_scripting_comref.htm#idh_sc_sound"

ghost zero
Posts: 842
Joined: 26 Apr 2010 17:48

Re: How to add a sound to a custom toolbar button?

Post by ghost zero »

thanks, but how do i make the button play a sound and then run this [immediately, without waiting for sound to complete]...

"C:\Windows\System32\shell32.dll /163" run "control appwiz.cpl"

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: How to add a sound to a custom toolbar button?

Post by Stefan »

Maybe run() first,
then sound() second?

ghost zero
Posts: 842
Joined: 26 Apr 2010 17:48

Re: How to add a sound to a custom toolbar button?

Post by ghost zero »

i have this. but how can i make it so the sound plays first?

"C:\Windows\System32\shell32.dll /163" run "control appwiz.cpl"; sound "C:\sound.wav"

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

Re: How to add a sound to a custom toolbar button?

Post by serendipity »

This doesn't work:

Code: Select all

sound "C:\sound.wav"; run "control appwiz.cpl"; 

ghost zero
Posts: 842
Joined: 26 Apr 2010 17:48

Re: How to add a sound to a custom toolbar button?

Post by ghost zero »

so is it a bug that we can't put the sound first, or what?

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: How to add a sound to a custom toolbar button?

Post by TheQwerty »

serendipity wrote:This doesn't work:

Code: Select all

sound "C:\sound.wav"; run "control appwiz.cpl"; 
It doesn't? Seems to be functioning correctly here. :?

klownboy
Posts: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: How to add a sound to a custom toolbar button?

Post by klownboy »

Code: Select all

sound "C:\Windows\Media\Windows Balloon.wav"; run "control appwiz.cpl"; 
This worked fine for me too (Windows 7 x64). I didn't think it was working initially, but it turns out the XYplorer volume in the Volume Mixer in the Tray was turned way down to nearly "0" and you wouldn't know that necessarily unless you have the mixer open.

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

Re: How to add a sound to a custom toolbar button?

Post by serendipity »

TheQwerty wrote:
serendipity wrote:This doesn't work:

Code: Select all

sound "C:\sound.wav"; run "control appwiz.cpl"; 
It doesn't? Seems to be functioning correctly here. :?
No, it works fine for me.
My mistake, i put it wrongly, it was a question to ghost zero.
I meant, This doesn't work?

ghost zero
Posts: 842
Joined: 26 Apr 2010 17:48

Re: How to add a sound to a custom toolbar button?

Post by ghost zero »

ok now works. turns out i didn't need the: "C:\Windows\System32\shell32.dll /163"

Post Reply