You use a switch. You check for the spacebar and the switch being off (Jump=0) and turn it on. Then you turn off the switch when the jump is finished.
This uses a timer to automatically end the jump in 2 seconds:
do
` Check for spacebar and if the character is not jumping
if spacekey() and Jump=0
` Turn on the jump switch
Jump=1
` Start/Reset the timer
tim=timer()
endif
` Check if the character is currently jumping and if 2 seconds have passed
if Jump=1 and timer()>tim+2000
` Turn off the jump switch
Jump=0
endif
` Show if the character is jumping or not
if Jump=0
print "Not Jumping."
else
print "Jumping..."
endif
loop