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 ответов

91 просмотр

{$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.

Исполнительный Торшер
{$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

Плюшевый Химик
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?

Громадный Бурундук
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

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

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

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Мелодичный Сырник
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Фетровый Лингвист
2
30500 за редактор? )
Замшевый Алхимик
47
а через ESC-код ?
Виноградная Притча
29
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
Сентиментальная Вершина
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
Отзывчивая Шестерёнка
14
Добрый день! Скажите пожалуйста, а какие программы вы бы рекомендовали написать для того, чтобы научиться управлять памятью? Можно написать динамический массив, можно связный ...
Клюквенный Як
7
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Волшебный Ленивец
5
Ребят в СИ можно реализовать ООП?
Стеклянный Граммофон
33
https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_h_common.erl#L174 https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_olp.erl#L76 15 лет назад...
Укропная Путница
20
Карта сайта