


In the case of Notepad you would have to delete "notepad.exe" in the task manager. If you set the optional second parameter in the procedure call to #False, a potential window of the started application won't be displayed and won't appear in the taskbar. StartProgramAndWaitForTermination("Notepad") MessageRequester("Info", "Your application " + GetFilePart(CmdLine) + " has been terminated!", #MB_ICONINFORMATION) Result = WaitForSingleObject_(ProcessInfo\hProcess, #INFINITE)

MessageRequester("Error", "The start of your application " + GetFilePart(CmdLine) + " failed!", #MB_ICONERROR) If CreateProcess_(0, 0, 0, #True, #NORMAL_PRIORITY_CLASS, 0, 0, = 0 StartupInfo\wShowWindow = DisplayAppWindow Protected ProcessInfo.PROCESS_INFORMATION Program = #PB_Compiler_Home+"Compilers\pbcompiler.Procedure StartProgramAndWaitForTermination(CmdLine.S, DisplayAppWindow.I = #True) Program = #PB_Compiler_Home+"compilers/pbcompiler"ĬompilerElseIf #PB_Compiler_OS = #PB_OS_Windows For Linux/MacOS change the "/?" to "-h".ĬompilerIf #PB_Compiler_OS = #PB_OS_Linux Executes the PB compiler with the /? option and displays the output (windows version) p RunProgram ('prog.exe', '/', '', PBprogramopenpbprogramhide) if p while programrunning (p) setgadgettext (0, 'fusion en cours. It may be used in calls To get information about the program such As ReadProgramString() Or ProgramExitCode() Or other functions mentioned above. hey programmers, i run a program with runprogram and i want to show a waiting message like 'please wait) because waitprogram freezes the system and i tried with while but still blocking. If #PB_Program_Open was included in the Flags, the Return-value is a number that identifies the program. Nonzero If the program has been successfully launched, zero otherwise. WriteProgramData(): write Data To the programs input. WriteProgramString(): write a string To the programs input. ReadProgramError(): Read a string from the programs error output. ReadProgramData(): Read Data from the programs output. ReadProgramString(): Read a string from the programs output. AvailableProgramOutput(): check If the programs output is available. The following functions may be used For programs executed With the 'Read', 'Write' And 'Error' flags: CloseProgram(): close the connection To the program. ProgramExitCode(): get the exitcode of the program. WaitProgram(): wait For the program To End. ProgramRunning(): check If the program is still running. ProgramID(): returns the OS ProcessID For the program. IsProgram(): check If the program number represents a valid program executed by RunProgram(). PictureFilePath PBCompilerHome + examples/sources/Data/PureBasic.bmp. The following functions may be used With a program that has been executed With the #PB_Program_Open flag: A collection of useful codes from the PureBasic forums and other sources. Several programs may be connected in this way, To 'pipe' Data through that group of connected programs. The output of the sender program will be sent directly To the input of the now executed program. The number returned when running this program must be passed As the 'SenderProgram' parameter To RunProgram(). When using the #PB_Program_Connect flag, another program must have been started before With #PB_Program_Open And #PB_Program_Read. The 'Read', 'Write', 'Error' And 'Connect' flags require the #PB_Program_Open flag To be set As well. A program executed With #PB_Program_Open must be closed With CloseProgram(). #PB_Program_Connect: Connect another programs output To this programs input. as there is still a problem with OpenCV working under PureBasic 圆4, there will probably be additional changes to the IplImage Structure. #PB_Program_Error : Read the error output of the program. Int in C needs to be converted to a Long in PureBasic (unless otherwise specified) an Int is 4 bytes under x86 but 8 bytes under 圆4 - throwing off Structure alignment. #PB_Program_Write : Write To the input of the program. An example: RunProgram ('Test.html') will open the web browser, which is generally used for displaying web sites on your system. #PB_Program_Read : Read the programs console output. #PB_Program_Open : Open the program To communicate With it Or get information about it. #PB_Program_Hide : Launch the program in invisible mode #PB_Program_Wait : Wait Until the launched program quits It can be a combination (using '|' Or operator) of the following values: Specifies the directory that will then be the current directory For the launched program. Specifies the command line parameters that will be passed To the program.
