 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
tmahan
Joined: 15 Mar 2005 Posts: 3
|
Posted: Tue Mar 15, 2005 11:09 pm Post subject: Newbie Question |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue Mar 15, 2005 11:41 pm Post subject: |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|