Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No documentation on working with DOSCommand #19

Open
FiftyTifty opened this issue Apr 10, 2022 · 2 comments
Open

No documentation on working with DOSCommand #19

FiftyTifty opened this issue Apr 10, 2022 · 2 comments

Comments

@FiftyTifty
Copy link

It's a very unfortunate, as DOSCommand looks much sleeker than handling stuff with ShellExecute, which is too bare-bones and not explained well either. But I've not the foggiest on how to properly run DOSCommand.

For example, there is no explanation on:

  • How to use of the events
  • How to work with anything in a command line application
  • How to set up the uses statements
  • How to issue multiple commands
  • How to terminate DOSCommand
  • How to wait for the current command to finish executing

My current issue, is that DOSCommand spawns a huge number of threads, faster than they exit. After 20 seconds of execution, my system is flooded with threads, and Delphi won't make any more. Even though I make sure to wait for execution to finish with the following statements:

while dosToRun.EndStatus = TEndStatus.esStill_Active do
                        	sleep(1);

There needs to be actual documentation. Two lines that don't do anything, and throw errors because more code needs to be added to the .pas file before they can actually function, is not enough to work with at all.

I'm happy to provide my current command line project, if that would help. It only has around 120 lines of code excluding whitespace.

@romankassebaum
Copy link
Contributor

Calling Sleep(1) in a while loop is deadly!

This is an open source library. If you have enough time feel free to write a documentation.

@FiftyTifty
Copy link
Author

If I knew how to use the library, I would. The issue, is that I want to know how to use the library. Without documentation, there's no way to learn how to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants