AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Newbie Question

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
tmahan



Joined: 15 Mar 2005
Posts: 3

PostPosted: Tue Mar 15, 2005 11:09 pm    Post subject: Newbie Question Reply with quote

If this has been asked, I apologize in advance.

Is it possible to generate a mouseclick based on a particular audiofile being played?

For example, open explorer, if wavfile=chimes.wav, then movemouse 200, 300, if wavfile=bells.wav then movemouse 400, 500

I know that the syntax is wrong...just trying to see if it is feasable

Thanks a bunch
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Mar 15, 2005 11:41 pm    Post subject: Reply with quote

This was asked about a while ago and the suggestion was to check if the sound file's last access time was "new", which would indicate that the file had just played. However, I don't think it worked (perhaps because the OS does not change the last access time in these cases).

One thing that might work is getting a utility such as "handle" from www.sysinternals.com. Then something like the following might reveal if a given sound file is currently playing:
Code:
Run, %comspec% /c handle chimes.wav >OpenFiles.txt
Playing := false
Loop, read, OpenFiles.txt
{
    IfInString, A_LoopReadLine, Chimes
    {
        Playing := true
        break
    }
}
if Playing
    MsgBox The file is open and probably playing.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group