Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Executing other applications...

Posted on 1997-12-28
11
Medium Priority
?
206 Views
Last Modified: 2010-04-04
Hi

I need to execute other application within my code.
The application does smth and then I have to close It.

So, How?

Please help

Matvey
0
Comment
Question by:MB122897
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 1

Expert Comment

by:anilms
ID: 1354797
The code for executing another application from within one application is straightforward :

WinExec('Application',1);

Suppose you want to execute the Windows Calculator :

WinExec('Calc.Exe',1);

The 1 is to indicate a normal application state. If you have a 0 instead of 1, it will just open and close the application without doing anytthing. The second parameter in the WinExec command is the state in which the new application should be executed. The first parameter is the application name within quotes. Be sure to include the full path if the application is not in the local directory or the system search path.


0
 

Author Comment

by:MB122897
ID: 1354798
Well, let's say that I want to execute smth like the win sound recorder with a wav file as a parameter .This one closes itself when it finishes playing, but I also have to know when it closes. But my application doesn't closes when finishes doing what it has to do.
So first of all I need a sugestin how to know when it finishes (if it's important - the application plays a sort of file), and when it does I have to close it.
I think it's really not simple, I just don't have more points to give you.

Matvey
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1354799
Hi MB,

For this I usually use a freeware component, which I find great and has a really good documentation, I suggest that you first have a look at it and then tell if it's what you're looking for are not.

It's called TExecFile and you can find it at :

 Heck, I don't know it anymore, but I have the zip-files. So if you want them I can send you them by email (16, 32 bit versions)

This is another, which I haven't tried out yet :

 torry.rimini.com/vcl/system/sfexec.zip

Regards,
Zif.

And I think, you sure DON'T have to give more points.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 8

Expert Comment

by:ZifNab
ID: 1354800
Forgot to mention, they tell you when execution is finished!
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1354801
Thanks, if you can send me the 32bit ver. My email is bosism@netvision.net.il

Matvey
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1354802
Oh, I realy thank you for that thing, it's realy useful and it's exactly what I need (the other one is less powerfull).
I've already thought of a way to know when I have to close it...

And to answer your question - 'il' is for 'Israel'.
Where do you live ?

Thank you, and I'd like to give you those points...
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 800 total points
ID: 1354803
I'm from Belgium. (be)

For answering the question :

Try the freeware component TExecfile for your purposes. It has realy good documentation and is very usefull for starting and ending all sorts of applications. It's on almost every component collection site.

Regards,
Zif.
0
 

Author Comment

by:MB122897
ID: 1354804
Thanks again

Could you tell me about some usefull sites ?

Matvey
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1354805
Sites for components?
0
 

Author Comment

by:MB122897
ID: 1354806
Yes, and other usefull programming stuff.
I can tell now about one I remember (maybe it was even you that gave me (or someone else) this shortcut, I don't remember...):

http://web.access.net.au/%7Egchandle/

It has some links and pakages for download...

If it's not a problem then send me some shortcuts.
I'll try to find smth interesting for you...

Thanks, Matvey
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question