I found that PULSIN will time out while you're waiting for something to happen then was clued in on WHILE:WEND.
So try this command set with something like:
Code:
WHILE GPIO.1 = 0    ' Repeat this loop while there is no signal
pulsout gpio.0, failsafe
pause pausetime
WEND
It comes in handy for something like this.