![]() ![]() So you want to filter out this response normally, which I used find command under DOS and the sed command under Linux to do. Like Locate under Linux will search the Trash folder. DIR \pbcompiler.exe /s /b will search all paths on this drive for a match to pbcompiler.exe and report back the full pathname when it finds a match, even to searching the RECYCLE folder. Since I can't actually try any of these approaches. The other option might be to have the pbcompiler accept a blank program name, or have the parameters passed with the name, or combine the program name with the parameters when the call is made. Now I just need to figure out what to use for a program to fill DIR's shoes. The pbcompiler should as well, because it can verify that the program file exists. Unless you do create an external version and give the path with it, in which case DOS will go for it. So if the pbcompiler wants assurances that the path/file are valid, you aren't going to find them. You can't even make a file named DIR.EXE to be called instead, because DOS will go for the internal version first. Unlike bash and other Unix/Linux shells, where all utilities are external, with DOS, some commands, like dir, are internal to the shell. That said, I think I've identified the problem. If you can't help, don't bother replying. Third, it's not any of your businees what I do or why I do it. ![]() Second, your post was completely pointless. MessageRequester("Compiler Problem:",program)įirst of all, I.m nit your Dude. Output$ "Exitcode: " Str(ProgramExitCode(Compiler))ĬloseProgram(Compiler) Close the connection to the program If FindString(temp$,"/.local/share/Trash/") = 0 MessageRequester("Compiler Error", " #PB_Compiler_OS = " #PB_Compiler_OS)Ĭompiler = RunProgram(program, request, "", #PB_Program_Open | #PB_Program_Read) Request = "dir \pbcompiler.exe /b /s | find /v " Chr(34) "RECYCLE\" Chr(34) Request = "/compilers/pbcompiler" : eol = Chr(10)Ĭ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) It may be used in calls To get information about the program such As ReadProgramString() Or ProgramExitCode() Or other functions mentioned above. 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(). The following functions may be used With a program that has been executed With the #PB_Program_Open flag: 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. #PB_Program_Error : Read the error output of the program. #PB_Program_Write : Write To the input of the program. #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. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |