169 похожих чатов

Hellow anyone Have code that run external app in windows and

that app takes time to load . Currently using Tprocess to do this but haven't finde any thing that hold my app to finish that external app loading . I know about waitonexit but that wait for exit not finish load . Any one can help ?

11 ответов

48 просмотров

{$mode delphi}{$H+} uses process; var P:TProcess; begin P:=TProcess.Create(nil); try {$ifdef mswindows} P.Executable :='dir'; P.Parameters.Add('/w'); {$else} P.Executable:='ls'; P.Parameters.Add('-l'); {$endif} P.Options:=[poWaitOnExit]; P.Execute; finally writeln('finished. Exitcode: ',P.exitcode); P.Free; Readln; end; end.

Mohammed Alotaibi
{$mode delphi}{$H+} uses process; var P:TProcess...

No . poWaitOnExit wait till external app exit but i don't want that . Want to wait till app completely loaded not completely exited ☹️

𐇔 𐌁𐌉𐌔𐌂𐌵𐌉𐌕 𐇔
No . poWaitOnExit wait till external app exit but ...

You need to read its output. Maybe then such an example would be suitable? https://github.com/Al-Muhandis/ShellRemoteBot/blob/8b1765c368771b3a3a9feb31b06ebe0b9389cfda/shellthread.pas#L489

Renat Suleymanov
You need to read its output. Maybe then such an ex...

Tnks . I checked i think its same as the wait to exit . Its can be wait for some output and then determine that app loads finished but my external app dont have any console output It just takes some time to load its config file then do something but want delete that config file after config loaded to external app . If i delete config file after executing Tprocess. The external app wil crash and closed

𐇔 𐌁𐌉𐌔𐌂𐌵𐌉𐌕 𐇔
Tnks . I checked i think its same as the wait to e...

The app that do you want to monitor, creates some window when it if fully loaded? It's multiplataform or just windows?

Fabio
So, how do you know when it's fully loaded?

I don't know my problem is that . There was RAD app maker that have such option that waits to app loaded and then continue rader that wait for exit And that RAD APP crated by freepascal so i think there is method must be in pascal to do that . In windows OS

𐇔 𐌁𐌉𐌔𐌂𐌵𐌉𐌕 𐇔
I don't know my problem is that . There was RAD ap...

On Linux you can monitor the apps at operating system level. Probably windows have this tool too

Похожие вопросы

Обсуждают сегодня

а через ESC-код ?
Alexey Kulakov
29
30500 за редактор? )
Владимир
47
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
13
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
program test; {$mode delphi} procedure proc(v: int32); overload; begin end; procedure proc(v: int64); overload; begin end; var x: uint64; begin proc(x); end. Уж не знаю...
notme
6
Как передать управляющий символ в открытую через CreateProcess консоль? Собсна, есть процедура: procedure TRedirectThread.WriteData(Data: OEMString); var Written: Cardinal;...
Serjone
4
вы делали что-то подобное и как? может есть либы готовые? увидел картинку нокода, где всё линиями соединено и стало интересно попробовать то же в ddl на lua сделать. решил с ч...
Victor
8
Ребят в СИ можно реализовать ООП?
Николай
33
Подскажите пожалуйста, как в CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); получить наз...
A Z
7
Карта сайта