Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

ExecuteIORedirect [Delphi, Windows]


Страницы:   1 2

Rocket ©   (2005-01-03 23:11:00) 

Настало время, когда наконец действительно надо использовать, а терпение на исходе. Помогите, плиз. Так работающего примера и не встретил.


thaddy   (2005-01-20 11:19:00) [1]

As promised I have emailed Rocket two alpha's 001 and 0.03 of the doscommand.pas translation for KOL that work but still have small issues. The last one is available as a private download or email attachment.
I'll give you the link if you email me at: kol[@]chello.nl if you may want to help resolve the last issues.
The weirdest bug is that it only works with {$OPTIMIZE OFF} ???
And it has some memory leaks inherited from the original code.


thaddy   (2005-01-10 20:27:00) [2]

I promised Evgeny I will test it, and fix it. Can take a couple of days....
Haven't got much time.
But I know the translation must be very close since everything is 99% the same. Maybe some help?


Rocket   (2005-01-09 20:00:00) [3]

And...

//You can cast it to DosCommand Fthread if you put that in the public section or add a property Thread that reads FThread.

...why is that?


Rocket   (2005-01-09 19:59:00) [4]

I did the same as in VCL and I got no output... :(


thaddy   (2005-01-09 18:50:00) [5]

It is exactly the same as the original except for the thread parameter! I just translated it Q&D
You can cast it to DosCommand Fthread if you put that in the public section or add a property Thread that reads FThread.


Rocket   (2005-01-09 17:57:00) [6]

Any example of usage would be very appreciated as I'm having problems using it.

What PThread should I pass as sender to DosCommand.Execute?
What (and how) should I assign to DosCommand.OnNewLine?


thaddy   (2005-01-09 16:46:00) [7]

UNTESTED but should work 99%:
http://members.chello.nl/t.koning8/koldoscommand.pas


Rocket   (2005-01-09 15:54:00) [8]

What do you mean "Only the demo works in a different way..."?
Demo uses OnNewLine too...

"I will have a look at doscommand"
Please...


Rocket   (2005-01-09 14:15:00) [9]

Nope. It's still no output. Try, for example, lame.exe in the process of something. It won't give me no output at all. Though '--help' works but AFTER exiting with code 0.


thaddy   (2005-01-09 13:46:00) [10]

Only this change:

Edit.Add(List.Items[List.Count-1]+#13#10);


thaddy   (2005-01-09 13:37:00) [11]

Only the demo works in a different way...
Use the OnNewLine event and everything works as you would want it..
The code is a bit old but I remember that it works that way.
I will have a look at doscommand


Rocket   (2005-01-09 13:14:00) [12]

But it works in different way :(

1) it gives output only after terminating the process;
2) output is not always there.

DosCommand does not have these issues. Maybe we should try to merge them?


Rocket   (2005-01-09 12:48:00) [13]

Wow! Thanks! It works! :)


thaddy   (2005-01-09 12:34:00) [14]

Another solution may be this:
http://members.chello.nl/t.koning8/consoledemo.zip

It is pure KOL and has some adnatages over the KOL functions (Line by line event);


Rocket   (2005-01-09 11:28:00) [15]

http://rocket.thefreebizhost.com/KOLDosCommand.zip(5K)

Было не легко. Но и не работает :(

Может кто-нибудь хотя бы посмотреть, что я сделал не так? Исправить? Пожалуйста? :)


ECM   (2005-01-06 14:12:00) [16]

>Уже голова пухнет :)
А никто и не говорил, что будет легко ...:)
Что тут можно посоветовать - хорошо разберись c VCL-вариантом - как там что работает.
И начинай писать свой вариант (по кусочкам - разбей задачу на более мелкие подзадачи), но уже на КОЛ...
Примеры как и чего делается на КОЛ в 90% случаев расположены в KOL.PAS :)


Rocket   (2005-01-06 13:41:00) [17]

ECM, спасибо хоть за какой-то ответ.

Я не требовал, чтобы всё делали за меня, а просил помочь...


> Пока это кому-нибудь действительно не понадобится

Мне действительно понадобилось :)


> Попытайся конкретно сформулировать, что ты делал и, что
> у тебя не получается...

:) Невохможно сформулировать конкретно, как бы я ни пытался... Я ж говорю про то, как мне сделать самому, если ни примеров, ни инструкций нет? Пытаюсь методом тыка, заменил (как-то :) ) классы на объекты, конструкторы Create функциями NewXXX, указатели на объекты добавил. Даже один раз всё скомпилилось, когда я пол-кода закомментировал :) Уже голова пухнет :)

(Под примерами подразумевается один и тот же невизуальный компонент с зеркалом, написанный под VCL и под KOL - тогда можно будет с чего-то брать пример).


ECM   (2005-01-06 13:25:00) [18]

>Помогите уже...
Нет, так не правильно ... ты хочешь чтобы за тебя все делали?
Пока это кому-нибудь действительно не понадобится - никто
портировать не будет.
Попытайся конкретно сформулировать, что ты делал и, что у тебя не получается... Тогда может, кто-нибудь и подскажет... :)
Правильно сформулированный вопрос - половина ответа...


Rocket   (2005-01-06 12:10:00) [19]

Нашёл док по созданию компонент на bonanzas.rinet.ru... Вот там как раз такой случай описан - Writing non-visual "components" и Writing a mirror for non-visual component. Пытаюсь, пока неудачно... Помогите уже, а? :)


Rocket   (2005-01-05 19:01:00) [20]

:))))))))))))))))

OK.
Hello. My name is Evgeny. I am eighteen years old. I live and work in Russia, Orenburg city. I like to use KOL when writing my programs because the resulting exe-files are very small and fast.

Some time ago I wanted to write a graphical user interface for command-line-based program <xxx> (put any command-line-based program instead of <xxx>). The thing is that I saw many GUIs that launch such apps without console window showing up. Instead they show all the progress and statistics info right on the GUI form. That looks great. I named this thread 'ExecuteIORedirect' (I'd rename it, but you can't rename your own thread on this forum) beacause I wanted to redirect console output to my form (and this function supposed to do this exactly). But I didn't understand how to use it.

So I've continue my research and found this interesting component - DosCommand (look for the download link above). It's very simple to use and it does just what I want. But the one thing makes it useless to me: it's for VCL.

I know that it's simple to convert this little component to KOL (and MCK) because it uses mostly WinAPI code. But I just didn't see any manuals for converting, or examples of the same component in VCL and KOL+MCK, so I don't know where and what should I change.

All I wanted to ask you, Dear Delphi and KOL Masters, is to convert this thing or give me a guide on how this is done.

Thank you, Best Regards.
Rocket

:))))))))))))))))

Надеюсь, модераторы простят прикол.


Страницы:   1 2

Наверх

Титульная страница Поиск, карта сайта Написать письмо