set bell to anyfile.wav?? chr(7) does not work in vfp9 any suggestions? Thanks,Wes Text CONVERTVFPNOW to 44222 to stay informed about the end of Visual FoxPro or email back to us and ask us to put you on our newsletter list. Wes Wilson, President ERW Custom Programming, Inc. Crescent Lake Plaza 5459 Elizabeth Lake Rd. Waterford, MI 48327 (248) 683-4182 LinkedIn Profile "Companies pay too much attention to the cost of doing something. They should worry more about the cost of not doing it" Philip Kotler www.erw.com wes@erw.com
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Yeah. Dump the ?? and use the Windows API. (I think I found the API stuff on the news2news site a long time ago. Wouldn't want anyone here think I was smart enough to figure that out on my own.) The rest of it is just some defensive coding.
FUNCTION playSound(m.soundFile AS Character, m.soundMode AS Int) TRY IF VARTYPE(m.soundMode)=[L] m.soundMode=0 && SND_SYNC ENDIF IF VARTYPE(m.soundFile)=[L] m.soundFile=[ding.wav] ENDIF DECLARE INTEGER sndPlaySound IN WinMM.dll STRING lpszSoundName, INTEGER uFlags sndPlaySound(FULLPATH(m.soundFile), m.soundMode) CATCH TO m.loError FINALLY ENDTRY ENDFUNC
--
rk
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Wes Wilson Sent: Wednesday, August 16, 2017 8:55 AM To: profoxtech@leafe.com Subject: Set bell to anyfile.wav
set bell to anyfile.wav?? chr(7) does not work in vfp9 any suggestions? Thanks,Wes Text CONVERTVFPNOW to 44222 to stay informed about the end of Visual FoxPro or email back to us and ask us to put you on our newsletter list. Wes Wilson, President ERW Custom Programming, Inc. Crescent Lake Plaza 5459 Elizabeth Lake Rd. Waterford, MI 48327 (248) 683-4182 LinkedIn Profile "Companies pay too much attention to the cost of doing something. They should worry more about the cost of not doing it" Philip Kotler www.erw.com wes@erw.com
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1049735392.2833123.1502888123032@mail... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/1049735392.2833123.1502888123032@mail.yahoo.com
On Wed, Aug 16, 2017 at 8:55 AM, Wes Wilson erwweswilson@yahoo.com wrote:
set bell to anyfile.wav
?? chr(7)
does not work in vfp9
What have you tried? Is the sound volume on? Are the speakers plugged in? Is the file name in quotation marks? Does the file exist? Have you tried FULLPATH("anyfile.wav")? What does SET("BELL",1) return?
And Rich's suggestion is a good one.
Dne 16.8.2017 v 14:55 Wes Wilson napsal(a):
set bell to anyfile.wav?? chr(7) does not work in vfp9
It does:
* SET BELL TO FULLPATH("gong.wav") && works * SET BELL TO "gong.wav" && works SET BELL TO gong.wav && does not work, awaiting char expression ?? CHR(7)
any suggestions? Thanks,Wes Text CONVERTVFPNOW to 44222 to stay informed about the end of Visual FoxPro or email back to us and ask us to put you on our newsletter list. Wes Wilson, President ERW Custom Programming, Inc. Crescent Lake Plaza 5459 Elizabeth Lake Rd. Waterford, MI 48327 (248) 683-4182 LinkedIn Profile "Companies pay too much attention to the cost of doing something. They should worry more about the cost of not doing it" Philip Kotler www.erw.com wes@erw.com
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
This works for me:
SET BELL TO ("C:\WINDOWS\MEDIA\ringout.WAV") ? SET("Bell",1) ?? CHR(7)
... but if your expression evaluates to an invalid dir the setting remains at the default.