ScriptCtrl = Новый COMОбъект("MSScriptControl.ScriptControl"); ScriptCtrl.Language = "vbscript"; ScriptCtrl.AddCode(" Function PlayS() | Set Wrap = CreateObject(""DynamicWrapper"") | Wrap.Register ""winmm.dll"", ""sndPlaySound"", ""i=sl"", ""f=s"", "r=l"" | PlayS = Wrap.sndPlaySound(""C:\Sounds\newemail.wav"", SDN_ASYNC) | End Function"); ScriptCtrl.Run("PlayS");