quinch, Stop guessing and look at the code and the SciTE Help file in which you found it: In the SciTE Help file: ; Add extra files to the resources
#AutoIt3Wrapper_Res_File_Add= ; Filename[,Section [,ResName[,LanguageCode]]] to be addedSo looking at the code: #AutoIt3Wrapper_Res_File_Add=C:WINDOWSMediatada.wav, SOUND, MYWAVwe see that: - Filename = C:WINDOWSMediatada.wav (what we want to hear) - Section = SOUND (hardly surprising!) - ResName = MYWAV (how we refer to the resource later) The next bit of the code: Global Const $SND_RESOURCE = 0x00040004
Global Const $SND_ASYNC = 1You see the Const bit? That indicates that the value concerned is a constant which is usually used in some form of function call - it is easier for us mere humans to understand a textual constant than a "magic number". And now we play the sound: DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", $SND_RESOURCE)Call the "winmm.dll" and ask it to run its internal "PlaySound" function on the resource known as "MYWAV" (which we set earlier) which it will find in the "SOUND" section of the resource table (because that is what the constant value means to the DLL). As I mentioned earlier, the script will pause while the sound plays. If we want it continue, we need to use the ASYNC constant as well - we use BitOR to combine them (see the Setting Styles tutorial in the Wiki to see why ). The loop just proves that the script does indeed continue: DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", BitOR($SND_RESOURCE, $SND_ASYNC))
For $n = 1 To 100
Sleep(15)
ToolTip("Asynch! " & $n)
NextClearer now? M23