Code: Select all
SPEAK(atuff) {
DetectHiddenWindows, on
Sleep 200
Loop {
IfWinNotExist,speak.ahk
break
Sleep 200
}
Sleep 200
DetectHiddenWindows, off
IniWrite,%atuff%,waiting.ini,settings,speak
Run, speak.ahk
}
Code: Select all
Sleep 200
IniRead,speak,waiting.ini,settings,speak
If(InStr(speak,"beep600")) {
speak:= StrReplace(speak,"beep600", "", beep600count) ; SoundPlay,beep-05.wav
SoundBeep,600,500
Sleep,500
}
If(InStr(speak,"beep-5")) {
speak:= StrReplace(speak,"beep-5", "", beep-5600count) ;
SoundPlay,beep-05.wav
Sleep,500
}
ComObjCreate("SAPI.SpVoice").Speak(speak)
If(beep600count=2)
SoundBeep,600,500
If(beep-5600count=2)
SoundPlay,beep-05.wav
IniDelete,waiting.ini,settings,speak
ExitApp
It works as planned for a while until I get the following error message:
Why does it suddenly stop finding the speak.ahk script? You can clearly see it in the back on the right and it was found and used a few seconds before he error message.
I don't get it.