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

19 просмотров

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

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

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

@MrMiscipitlick А можешь макрос написать, который будет вычислять смещение относительно переданных меток? Просто .label1-.label2, и вернуть значение.
КТ315
35
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
А еще в перле можно уже @arr1 + @arr2?
Sergei Zhmylove
53
Подобного рода ;Следующие три строки это директивы ассемблера, ;которые можно не задавать, т.к.работаем в Visual Studio. ;Символ ";" - это начало однострочного комментария ...
Егор Анелькин
3
Кто-нибудь знает почему SPM клонирует репо целиком? Некоторые репы просто огромные, как та же swift-syntax которая нужна для использования макросов. Сначала подумал, что это...
iMike
6
Привет всем. появился вопрос. Разрабатываю сайт, в данный момент он запущен. Хостинг beget. Добавляю на сайт яндекс метрику с помощью полей client-settings (взято отсюда http...
Andrew
2
Подскажите, где смотреть результат выполнения программы? Код: ;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, станда...
Егор Анелькин
5
еще вопрос, допустим мы создадим char массив из 10 элементов и присвоим ему через сканф 10 символов. и выведем все символы. Хотел спросить последний элемент /0 будет включать...
Anthem
11
открыть папку в проводнике: 1 - ShellExecute 2 - ExecuteProcess 3 - OpenDocument что лучше выбрать?
Alexey Kulakov
12
;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, стандартный ;вызов процедуры ;option casemap:no...
Егор Анелькин
1
Карта сайта