Jump to content

Recommended Posts

Posted (edited)

Hello,

I am trying to update a project that i have for media and i was wondering, until now to be able to mute the media i used to use Send("{VOLUME_MUTE}").
However this is not a very good way to mute media since it mutes the volume of the computer.

Is there an other way to mute it without having to mute the volume of the computer.
Of course i don't mean controlclicks on the volume...

Cheers

 

Edited by AutID
Posted (edited)

Global $oWMP = ObjCreate("WMPlayer.ocx")
$oWMP.Settings.mute = True

Maybe this'll work for you. I don't know if it acutually mutes the whole programm, or just the wmplayer part. But I think it does, since if you click on the mixer, it seems to be muted.

Edited by Jonniy

Thanks for your help & have a good day. Yours sincerely, -Jonniy-  

Posted

That will work like this:

Local $loPlayer = ObjCreate("WMPlayer.OCX")
Local $loItems = $loPlayer.MediaCollection
Local $loSong= $loItems.add("C:\Users\me\Music\song.mp3")
Local $loPlayList = $loPlayer.currentPLayList
$loPlayList.AppendItem($loSong)
$loPlayer.Controls.PLay()
Sleep(5000)
$loPlayer.Settings.mute = True
Sleep(5000)
$loPlayer.Settings.mute = False
Sleep(5000)
$loPlayer.Controls.Stop()
$loPlayer.close

but not when i am playing it manually...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...