Sign in to follow this  
Followers 0
d3mon

Detect sound played by game

11 posts in this topic

Hello everybody,

It is possible to detect when a game play a sound ?

Thanks for anwsers.


No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE

Share this post


Link to post
Share on other sites



Hello everybody,

It is possible to detect when a game play a sound ?

Thanks for anwsers.

You can check the status of a sound with _SoundStatus(), but I'm not sure if _SoundOpen() locks the file or not. I've never used the _Sound* functions.

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites

You can check the status of a sound with _SoundStatus(), but I'm not sure if _SoundOpen() locks the file or not. I've never used the _Sound* functions.

Well I've tried but he does'nt know if the sound has been played or not...

Anyhelp ?


No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE

Share this post


Link to post
Share on other sites

Well I've tried but he does'nt know if the sound has been played or not...

Anyhelp ?

Can you post the code you tried?

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites

Can you post the code you tried?

#Include <Sound.au3>
$sound=_SoundStatus('bombpl.wav')

While 1
If  $sound = 1 Then
MsgBox(0,"","OK")
EndIf
WEnd

No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Try:

#Include <Sound.au3>
$sound = _SoundOpen('bombpl.wav')

While 1
    $status = _SoundStatus($sound)
    If  $status = "playing" Then
        MsgBox(0,"","Sound is playing!")
    EndIf
    Sleep(100)
WEnd
Edited by Airwolf

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites

Try:

#Include <Sound.au3>
$sound = _SoundOpen('bombpl.wav')

While 1
    $status = _SoundStatus($sound)
    If  $status = "playing" Then
        MsgBox(0,"","Sound is playing!")
    EndIf
    Sleep(100)
WEnd
Thanks but it doesn't work...it's because I play the sound with VLC or it's another thing ?

No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE

Share this post


Link to post
Share on other sites

AnyHelp ?


No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE

Share this post


Link to post
Share on other sites

AnyHelp ?


No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0