The contents of "When I say" for Prefix and Suffix
Either way, I still have no idea what you're trying to do here. What you've told VoiceAttack to do is the following:
If ChatWindowOpen Equals False
- Press F12 to open the chat window
- Press Enter, which would close the chat window again, I assume
- Press Enter again, without the chat window open
- Press /
- Press d
- Press a
- Press n
- Press c
- Press e
- Press Enter one more time, still without the chat window open
- Press F12, to open the chat window
If ChatWindowOpen Equals True
- Press Enter, without the chat window open
- Press Enter again, still without the chat window open
- Press /
- Press d
- Press a
- Press n
- Press c
- Press e
- Press Enter one more time, still without the chat window open
If this is indeed correct:
If I understood correctly, the intended order of operations is this:
- Press F12 to open the chat window
- Type "/"
- Type "dance"
- Press Enter to send the text and close the chat window
You'd have to state whether the chat window is open or closed in the Prefix:
"[Open;] Chat action" (I.E. if the chat is already open you'd say "Open Chat action dance", this way you can formulate the command concisely)
Begin Text Compare : [{PREFIX}] Does Not Start With 'Open'
Set Boolean [Chat Window Open] to False
Else
Set Boolean [Chat Window Open] to True
End Condition
And the Suffix, as before:
"dance"
Begin Boolean Compare : [Chat Window Open] Equals False
Press F12 key and hold for 0,06 seconds and release
End Condition
Press / key and hold for 0,06 seconds and release
Quick Input, 'dance'
Press Enter key and hold for 0,06 seconds and release
That's one way to do it, however, as pressing F12(or not) is only done at the start, from what I understand at least, you may prefer the following:
"[Open;] Chat action"
Begin Text Compare : [{PREFIX}] Does Not Start With 'Open'
Press F12 key and hold for 0,06 seconds and release
End Condition
Press / key and hold for 0,06 seconds and release
"dance"
Quick Input, 'dance'
Press Enter key and hold for 0,06 seconds and release
This does away with the variable, and repeats the fewest actions for multiple Suffixes.
Now, personally, I tend to underutilize Prefixes and Suffixes, so I would use:
"[Open;] Chat action dance"
Begin Text Compare : [{CMD}] Does Not Start With 'Open'
Press F12 key and hold for 0,06 seconds and release
End Condition
Press / key and hold for 0,06 seconds and release
Quick Input, 'dance'
Press Enter key and hold for 0,06 seconds and release
I've looked into it, and it is possible Prefixes and Suffixes pass a similar structure to the speech engine(Gary?), rather than complete phrases(which is apparently possible according to SAPI documentation), but I don't know what the performance implications of that would be.
The main reason to use a Prefix/Suffix structure is to save on editing multiple commands when you want to change something. E.G. if the chat key changes from F12 to something else, you only have to edit one Prefix instead of all the commands using that key. You should decide which method seems more sensible to you.