I read a post on the mircosoft website and it got me thinking.
Our warehouse does alot of scanning and when a package is closed I would like it to play a specific sound so they don't have to keep looking back at the screen to see if the order has been closed.
The sound is SOUND55.WAV which is from the Built In MS pinball game or something.
I added this code on
OnPush()
WMPlayer.openPlayer ('Mydrive:\MyDir\SOUND55.WAV');
Works fine But It pops the Windows Media Player Up and I just want the sound and I don't need WMP to POP in front of Navision & lose focus .
I tried the WMPlayer.ShowDisplay := FALSE;
AnimationAtStart := False
TransparentAtStart := False
ShowDisplay :=False
I get a NAv error when saving that Nav doesn't understand these params.
WMPlayer.close;
doesn't close anything?
Is there a parameter list or does anyone know how to get the sound only?
All the Params I could Find
http://www.w3schools.com/media/media_playerref.asp
Answers
Maybe you can look at the C/AL Code of that project to get you further.
I just need a way to surpress the player and just get the sound.
I've tried a bunch of parameters but can't find the right one.
http://www.BiloBeauty.com
http://www.autismspeaks.org
BEEP(5000, 200);
BEEP(4000, 200);
BEEP(3000, 200);
BEEP(2000, 200);
BEEP(3000, 200);
BEEP(4000, 200);
http://www.BiloBeauty.com
http://www.autismspeaks.org
I think the problem is not playing the file in windows media player. The problem is that once the media player is open, the control does not switch back to Navision.
This is especially a problem when you're using a barcode scanner and want to play a .wav file to the user if an mistake is made, but want Navision to be active.
Harry, I've been trying to solve this problems too with our e-ship customers. Will let you know if I find a solution.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I've made the changes on these Functions...
Would be better to use real good noticable sounds instead of little beeps n' tings.
Yes, I can play the sound but I just want the sound without the whole WMP program getting in the way.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Var:
WMPlayer - OCX - Windows Media Player
Code:
WMPlayer.openPlayer ('Mydrive:\MyDir\SOUND55.WAV');
When I switch it to "open" alone I get
you have specified an unknown Variable
Open
Win 2000 server - using WMP 9
http://www.BiloBeauty.com
http://www.autismspeaks.org
So you probably need to install Windows Media Player 10.
http://www.BiloBeauty.com
http://www.autismspeaks.org
and register that one too maybe rename it wmp10.dll or something.
](*,)
http://www.BiloBeauty.com
http://www.autismspeaks.org
Luc, what version of Navision are you using?
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I'm using Windows XP Professional for my OS.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
There are actually 2 OCX controls that's registered so you have to be careful of which one you select.
The one that Harry and myself was using was:
C:\WINDOWS\system32\wmp.dll
This OCX control only has the openPlayer method.
The one Luc was using was:
C:\WINDOWS\system32\msdxm.ocx
This OCX control has the open method available.
To get the C:\WINDOWS\system32\msdxm.ocx OCX control, I basically unregistered the existing C:\WINDOWS\system32\wmp.dll in Navision. Exited Navision, then re-register the wmp.dll file.
Afterwards, I get 2 OCX controls with Windows Media Player. One pointing to wmp.dll and the other one pointing to msdxm.ocx.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
http://www.BiloBeauty.com
http://www.autismspeaks.org
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
http://www.BiloBeauty.com
http://www.autismspeaks.org
The DLL provides 2 methods:
1 - Play
Plays a WAV file immediately, if there was a sound playing already, it's stopped and then the new sound begins playing immediately.
PARAMETRS:
FileName: WAV file to play.
Wait: Set to FALSE if you want the function to return immediately without waiting for the sound to finish.
2 - Stop
Stops any sound that might still be playing. You are not required to call this function.
Please try it and let me know. I have already tested it with Windows 98 and XP.
http://www.autocloseidle.com
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Few months ago; in a grocery store, one cashier was scanning items too quickly and sometimes the beep sound is too late, so the cashier thinks the item was not scanned probably, so she scans it again, only to hear 2 successive beeps, so now she has to cancel one of scans to avoid double charging the customer. She had to work slower to allow the machine to catch up.
I am not sure what software they are using, but they seem to have upgraded their systems a year ago and they are using modern equipment with LCD touch screens and all that.
So this alternative DLL is suitable for those who want to play WAV files only with minimal system resources.
I plan to submit this DLL to the download section of mibuso, but I wanted to hear from others if they want any changes made to the DLL before submitting it...
http://www.autocloseidle.com
The file that gave the best results for us is:
http://www.talkingwav.com/wavs/beep_16.wav
Maybe you found something that's louder, higher pitch, and more annoying than this one?
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
it's part of the pinball game that comes with windows
it tell us the order is closed & screen cleared
it's pretty loud - we need that for our warehouse because we have radios's playing, fans, misc noise. easily heard
Renamed:
http://savatage99.googlepages.com/SOUNDLONG.WAV
http://www.BiloBeauty.com
http://www.autismspeaks.org
Add to codeunit 14000746 at the bottom of GetScaleWeight
http://savatage99.googlepages.com/SOUNDERROR.WAV
http://www.BiloBeauty.com
http://www.autismspeaks.org
http://www.BiloBeauty.com
http://www.autismspeaks.org
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I guess.. :-k
http://www.BiloBeauty.com
http://www.autismspeaks.org
Hi aci,
Thanks for sharing. But, how to use it in NAV?
Johanna