Graphics 800,600
Text 0,0, "hello dear friend"
Text 0,0"Press Spacebar to continue"
While Not KeyHit(1)
Wend
End
Text 0,0, "hello dear friend"
Text 0,0"Press Spacebar to continue"
While Not KeyHit(1)
Wend
End
Graphics 800,600 Text 0,0, "hello dear friend" Delay 2000;delay 2 seconds before anything else happens Cls;clear screen so text at 0,0 is not overwritten .NoSpacebarYet;label to goto if spacebar not hit(but it's better to use function, not goto) Text 0,0, "Press Spacebar to continue" WaitKey();wait for any key to be pressed before processing the If statement below If KeyHit(57);57 is scancode for the spacebar Cls;clear screen so text at 0,0 is not overwritten Text 0,0, "You Pressed the Spacebar, Here is More Text" WaitKey();wait for any key to be pressed before ending program Else Goto NoSpacebarYet;goto the NoSpacebarYet label if key other than spacebar is hit EndIf End;end the program