I'm not a professional programmer, so writing scripts in AHK involves a lot of debugging and trial-n-error. My two main ways to debug are:
1. Ample use of MsgBox to show me what line the code it on.
2. SoundBeeps of various durations and frequencies, for the same reason.
What if we combine those two things with a "Talking MsgBox?" This would be like a separate library. Put "#Include TalkingLib" or whatever in the top of your script during debugging. It would be called via Talk("text to speak").
Geek idea: Talking MsgBox for debugging...
Forum rules
Discuss Autohotkey related topics here. Not a place to share code.
Discuss Autohotkey related topics here. Not a place to share code.
Geek idea: Talking MsgBox for debugging...
ste(phen|ve) kunkel
Re: Geek idea: Talking MsgBox for debugging...
No need for a library.
Russ
Code: Select all
#Requires AutoHotkey v1.1.33+
ComObjCreate("SAPI.SpVoice").Speak("Peter Piper picked a peck of pickled peppers")
Code: Select all
#Requires AutoHotkey v2.0+
ComObject("SAPI.SpVoice").Speak("Peter Piper picked a peck of pickled peppers")
Re: Geek idea: Talking MsgBox for debugging...
This is excellent! Thanks Russ!RussF wrote: ↑11 Aug 2023, 05:29No need for a library.Code: Select all
#Requires AutoHotkey v1.1.33+ ComObjCreate("SAPI.SpVoice").Speak("Peter Piper picked a peck of pickled peppers")
RussCode: Select all
#Requires AutoHotkey v2.0+ ComObject("SAPI.SpVoice").Speak("Peter Piper picked a peck of pickled peppers")
ste(phen|ve) kunkel