Jump to content

Sense Audio


Recommended Posts

Hello, I have little experience with autoit and I was wondering if there is a way to tell if sound is being played at a particular time. This way, I can tell if a program has completely loaded before running the rest of my script. Thanks in advance.

Link to comment
Share on other sites

easy way: find another way without sound :)

Any suggestions? I am trying to hook onto WoW to tell when it is loaded. Since it loads at different speeds, the sleep command does not work.

Trying to make this work:

Dim $WoWPath
Dim $Title

$Title = "World of Warcraft"

; Check if WoW running
If WinExists($Title) Then
; Do Nothing
Else
; Check where WoW is installed, from registry
    $WoWPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\World of Warcraft", "GamePath")
; Check if the reg entry existed
    If $WoWPath <> "" Then
        Run($WoWPath)
    Else
        MsgBox(48, "WoW", "WoW has not been detected. If WoW is installed, please start it manually.")
    EndIf
EndIf

Sleep(5000)

If WinExists($Title) Then
    ControlSend($Title, "", "", "{p}")
    ControlSend($Title, "", "", "{q}")
    ControlSend($Title, "", "", "{s}")
    ControlSend($Title, "", "", "{s}")
    ControlSend($Title, "", "", "{w}")
    ControlSend($Title, "", "", "{o}")
    ControlSend($Title, "", "", "{r}")
    ControlSend($Title, "", "", "{d}")
    ControlSend($Title, "", "", "{1}")
        //When Loaded
                Sleep(10)
            ControlSend($Title, "", "", "{ENTER}")
EndIf

Exit
Edited by Cpc197c
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...