; ExecFile Example ; ---------------- ; ExecFile launches another program (or opens a document with its ; associated program) via the Windows shell. Print "This example can launch the Windows Notepad." Print "" Print "Press and hold Y to launch Notepad, or any other key to skip" WaitKey ; WaitKey returns as the key goes down, so the chosen key is still held If KeyDown(21) Then ; Launch Notepad - wrap paths in Chr$(34) quotes if they have spaces ExecFile "notepad.exe" Print "Launched notepad.exe" Else Print "Skipped launching Notepad." EndIf Print "" Print "Press any key to close the example" WaitKey End