You could do something like this:
Press down W key
Start Loop While : Keyboard Key 'W' Is Pressed
Pause 0,5 seconds
Press S key and hold for 0,01 seconds and release
End Loop
Because VoiceAttack is holding the W key down, the loop will keep going until you release that key (either by pressing and releasing the physical key, or by another method, E.G. using another VoiceAttack command), after which the command will stop (depending on where in the cycle the loop is, that can take up to the pause length you have set to occur).