Old 9th April 2009, 14:53   #1
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Using System Plugin to play Windows default sound.

Most likely it's possible to use the System Plugin to play a default Windows sound e.g. ding.wav / notify.wav etc.

I just have not idea how to do it

Anyone willing to offer a working example?

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 9th April 2009, 15:52   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
code:

!addplugindir "."
!addincludedir "."

!include "nsDialogs.nsh"
!include "winmessages.nsh"
!include "logiclib.nsh"

!include "MUI2.nsh"

OutFile "test.exe"

Function .onInit
!define MB_ICONASTERISK 0x00000040
!define SystemDefault 0x0000000
Sleep 500
System::Call "user32::MessageBeep(i ${MB_ICONASTERISK})"
Sleep 500
System::Call "user32::MessageBeep(i ${SystemDefault})"

!define SND_ALIAS 0x10000
!define SND_FILENAME 0x20000
sleep 500
System::Call "winmm::PlaySound(t 'SystemStart', i 0, i ${SND_ALIAS})"
sleep 500
System::Call "winmm::PlaySound(t 'c:\WINDOWS\Media\notify.wav', i 0, i ${SND_FILENAME})"
FunctionEnd

Section
SectionEnd

!insertmacro MUI_LANGUAGE "English"



See:
http://msdn.microsoft.com/en-us/library/ms680356(VS.85).aspx

http://msdn.microsoft.com/en-us/library/ms712879.aspx
Animaether is offline   Reply With Quote
Old 9th April 2009, 16:11   #3
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Respect!!!

Thank you for the fast and accurate response!

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump