Closed Taomyn closed 4 years ago
Thanks for the report! This is an interesting one. This is by design, and I should also note that the log is intended as a debugging and diagnostic tool rather than user-oriented.
As things stand, the script is compiled, at which point all custom functions in it, including Log()
are run immediately, producing the output you are seeing, then the text output is fed to the text-to-speech engine for async processing. Any Pause()
commands etc are handled asyncronously by the text-to-speech engine.
Given your description, it looks like enabling the speechresponder.out
file and viewing it in Notepad++ with the "tail" option might better suit your needs.
I think the Log()
function is working as designed and as @richardbuckle described above. The parser resolved the script (including logging the requested data) then passed it to the speech synthesizer. The speech synthesizer just works much slower than the parser. ;-)
Though I think I know how we could revise the program to respect pauses and other vocalizations when logging, I'm not certain there is much utility in doing so.
Thank you @richardbuckle and @Tkael for the explanation, which makes sense. I suspected there was some kind of reason for the behaviour hence why I reported it as a question.
I will try the speechresponder.out option to see if that helps me when I debug my scripts.
I think we can call this closed.
EDDI version in which issue is found
3.5.2 and earlier
VoiceAttack version in which issue is found (as applicable)
n/a
Steps to reproduce
Expected
Logged data should be logged at the same points where the script is currently happening, with date/time of when it happened. If I place two "Log()" with a pauses of a total 7sec, I would expect each log entry to be 7 seconds apart
Observed
All the logged data comes out at the same moment at the start of the script regardless of what part of the script is currently running, all with the same date/time even when there are large pauses/waits
Investigation
Perhaps this is intended behaviour but it confused the heck out of me for a while. I'm debugging the FSD Engaged speech responder script by adding some logging lines and an extra pause. When I look at the log the date/time stamps for every "Log()" is the same and are all generated at the same time when monitored live - so it's not that the wrong date/time is logged they actually all appear in the log at the same time. Makes trying to check the timing of when to do things in a script a bit more difficult.
I add some lines:
I see the following when tailing the log: