Author Topic: Wav File Playing...  (Read 6851 times)

0 Members and 1 Guest are viewing this topic.

Swift

  • Swamp Rat
  • Posts: 596
Re: Wav File Playing...
« Reply #15 on: October 11, 2005, 02:41:31 PM »
try inserting this in a new module in the vbaide

Code: [Select]
Option Explicit
Private Declare Function PlaySound Lib "winmm.dll" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long

Private Const SND_ASYNC = &H1         '  play asynchronously
Private Const SND_FILENAME = &H20000  '  file name
Private Const NO_ERROR = 0

Public Sub MakeANoise()
PlaySound "c:\windows\media\ding", ByVal 0&, SND_FILENAME Or SND_ASYNC

End Sub


Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
Re: Wav File Playing...
« Reply #16 on: October 11, 2005, 02:45:46 PM »
That works!  Thanks...now to put that with the Erase reactor...after work...

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Wav File Playing...
« Reply #17 on: October 11, 2005, 02:46:34 PM »
if you try to use simple beep sound..

you can use  (acet-sys-beep Yoursoundhere)

or

(startapp "c:/windows/system32/sndrec32.exe /play /close"  "C:/windows/media/tada.wav")

but this will show the soundrecorder...
maybe it have a switch / to play background...but i don't know..
Keep smile...

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Wav File Playing...
« Reply #18 on: October 11, 2005, 02:58:16 PM »
One more time ... ACET* = Evil.

If you don't want to roll your own functions use DOSLIB's (dos_wav filename) function, but please don't use the ACET* crap, you're just begging for problems down the road and your users are the ones that will pay.
« Last Edit: October 11, 2005, 03:15:13 PM by MP »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

deegeecees

  • Guest
Re: Wav File Playing...
« Reply #19 on: October 11, 2005, 03:14:00 PM »
Code: [Select]
Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
 If (VBA.UCase$(CommandName) = "ERASE") Then
 Call PlayItSam
 End If
End Sub

This will not work the way it should, so please disregard.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Wav File Playing...
« Reply #20 on: October 11, 2005, 04:55:54 PM »
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Wav File Playing...
« Reply #21 on: October 11, 2005, 05:31:38 PM »
lol, this thread reminds me that I used to have the sound of a toilet flush everytime members of Microstation / PDS group changed projects (I had written a project management utility to map the network, modify the registry etc). I didn't keep the code active very long but it was funny while it was enabled.

 :-D
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Wav File Playing...
« Reply #22 on: October 11, 2005, 09:17:59 PM »
One more time ... ACET* = Evil.

If you don't want to roll your own functions use DOSLIB's (dos_wav filename) function, but please don't use the ACET* crap, you're just begging for problems down the road and your users are the ones that will pay.

MP could you explain exactly why ACET* is crap ?
I'm new with it...and for my own...seem to work.
Keep smile...