For the first command, is the intention for the second branch of the command to run after the key is released?
If so, this could work:
Set date [~startTime] to [~startTime] plus [1] seconds
Start Loop While : Keyboard Key 'A' Is Pressed
End Loop
Begin Date Compare : [~startTime] Is Greater Than Current Date/Time
Write '[Blue] A' to log
Else
Write '[Blue] B' to log
End Condition
The loop will idle the command as long as the key is held down(make sure it's set to the same keypress/button that triggers the command).
Once you release the key, the condition will check whether approximately one second(approximate because there is always a slight delay between pressing the physical key initially and VoiceAttack triggering the command) has elapsed, and if it has, execute branch B.
Otherwise, if the key has been held down less than a second(ish), it will execute branch A.
If the second branch is supposed to run *while* the key is still pressed, a modification can be made to the first example to accommodate this:
Set date [~startTime] to [~startTime] plus [1] seconds
Start Loop While : (Keyboard Key 'A' Is Pressed AND [~startTime] Is Greater Than Current Date/Time)
End Loop
Begin Date Compare : [~startTime] Is Greater Than Current Date/Time
Write '[Blue] A' to log
Else
Write '[Blue] B' to log
End Condition
If the key is held down longer than one second, the idler loop will end, and the command will execute.
The conditional will still determine whether the key has been held down longer than one second, which it always will have if the loop ended because the key was held down long enough.
For the second command, I'll assume "Pause" refers to the Pause/Break keyboard key:
Begin Boolean Compare : [>holdingPause] Equals True
Set Boolean [>holdingPause] to False
End Condition - Exit when condition met
Set date [~startTime] to [~startTime] plus [30] seconds
Set Boolean [>holdingPause] to True
Press Pause key and hold for 0,06 seconds and release
Start Loop While : ([~startTime] Is Greater Than Current Date/Time AND [>holdingPause] Equals True)
End Loop
Press Pause key and hold for 0,06 seconds and release
Set Boolean [>holdingPause] to False
When the command starts, the boolean is set to True, the "Pause" key is pressed and released, and the timer starts.
If you trigger the command a second time before the timer elapses, the second instance will set the boolean to false and exit the command without starting another loop.
Because the loop checks whether it remains True each time it comes around, the first instance will at that point end its loop and press the "Pause" key again.
Now, because the variable must be available to all running instances of the command, I chose to make it profile-scoped, meaning it does get discarded once you change profiles(as the command would also be terminated automatically at this point).
But, it also means you need to change the name of that variable if you choose to copy the logic to another command.
Otherwise triggering either command while the other is running would just stop the running command.