Your logic is correct, however, since you are triggering the command by voice by saying, 'listen', listening is then disabled. From then on, of course, VA will ignore spoken phrases (I know you get that by now - this is for those reading along
).
The reason why it works as separate commands for you is because VoiceAttack has a feature built in that was created initially to specifically handle exactly your situation - that is, you want to issue a simple spoken command to start listening when listening is off with little fuss. As you know, if listening is off, VoiceAttack is actually still listening but not executing commands. However, if the
first action of any normally-ignored-because-listening-is-off command happens to be 'start listening', VoiceAttack will just go ahead and execute the command.
This feature is also to execute any command when listening is off (not just simply turning listening on and off). The drawback being that listening is then turned on - which means it wont work for your conditional command, as listing will always be turned on and then immediately turned off through the logic. For your conditional command to work, you would have to circumvent listening by going into Profile Options and setting up 'Override listening if my spoken command begins with:'. If your override is, 'Computer', you would have to say, 'Computer listen' if listening was off. I do have a (very,
very) long-standing todo item to add an option to allow a command to be executed when listening is off (and then listening stays off).
On a side note, the logic you have could be replaced with 'Toggle Listening' action, which will do the toggling behind the scenes for you (no variables needed).
Hope that makes sense!