|
#7
|
|||
|
|||
|
Quote:
for i:=1 to Lst_Items.Items.Count do (verify itens. Count one, by one) begin frm_adx2mp3.Update; (i tried to use this method to avoid white screens, but it doesn't works. ._.) Origem:=GetShortFileName(Lst_Items.Items[0].caption)+' '+GetShortFileName(Relativo)+ExtractName(Extractfi lename(Lst_Items.Items[0].Caption))+'.mp3'; (var that receives the source of the ADX files and rename then to MP3 with the destiny selected at the start of this procedure) ExecAndWait(Pchar(Aplicativo), Pchar(Origem), SW_HIDE); (runs the funtion ExecAndWait to run the program and wait for the end to continue. The variable Aplicativo have received a string source of the program with the function at start of this procedure: Aplicativo:=ExtractFilePath( Application.ExeName )+'NAME OF APLICATON' ![]() Lst_Items.items[0].delete; (delete the first item of the list, to the program run the next one) end; ---- function ExecAndWait(const FileName, Params: string; const WindowState: Word): boolean; var SUInfo: TStartupInfo; ProcInfo: TProcessInformation; CmdLine: string; begin CmdLine := '"' + Filename + '"' + Params; FillChar(SUInfo, SizeOf(SUInfo), #0); with SUInfo do begin cb := SizeOf(SUInfo); dwFlags := STARTF_USESHOWWINDOW; wShowWindow := WindowState; end; Result := CreateProcess(nil, PChar(CmdLine), nil, nil, false, CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS, nil, PChar(ExtractFilePath(Filename)), SUInfo, ProcInfo); if Result then begin WaitForSingleObject(ProcInfo.hProcess, INFINITE); CloseHandle(ProcInfo.hProcess); CloseHandle(ProcInfo.hThread); end; end; This was the function that i have used to use an external program. --- I have an ideia! =) Can you give me an example to avoid this with another type of program? If you still on my place, what you will do? Last edited by Team Crystal; 15-09-2004 at 12:50. |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Enter the matrix and large game fix | timex | XBox Games | 10 | 07-03-2004 13:55 |
| Generic Pal 2 Ntsc Patcher ? | captainvik | XBox Games | 6 | 23-12-2003 20:51 |
| Pal Patcher Question | Odity | DC Games | 5 | 07-09-2003 08:44 |
| Where to find latest version of PAL Patcher? | Bursk | DC Games | 5 | 24-09-2002 08:20 |
| Napalm Patcher | boba fett | PSX Games | 0 | 12-03-2001 22:52 |