Access97 - Control An External Application

G

gargoyle60

I have an old Win98PC running Access97 and I want to control an external application.
I know about SendKeys, but I was wondering if there is a way in VBA to find existing running
applications (that haven't been started via SendKeys), either by finding their process ID or similar
way of identifying them.

I want to find the external application, capture/activate it to gain control and then probably use
SendKeys.

Is there a way to do this?
 
D

Douglas J Steele

See whether http://access.mvps.org/access/api/api0013.htm at "The Access
Web" helps at all.


"gargoyle60" wrote in message

I have an old Win98PC running Access97 and I want to control an external
application.
I know about SendKeys, but I was wondering if there is a way in VBA to find
existing running
applications (that haven't been started via SendKeys), either by finding
their process ID or similar
way of identifying them.

I want to find the external application, capture/activate it to gain control
and then probably use
SendKeys.

Is there a way to do this?
 
G

gargoyle60

See whether http://access.mvps.org/access/api/api0013.htm at "The Access
Web" helps at all.

Thanks for the link, but it doesn't help. It shows the name of the application but not its process
ID or task ID, which is what I need to stop/kill it later on.

Incidentally, the application (MBProbe) that I am starting via the Shell gets minimized to the
systray and so I can't use AppActivate to get its focus, so I might not be able to control it via
Access97 anyway.
All I wanted to do was start it at midnight and then shutdown (or kill it) one minute before
midnight on the following day, then manipulate its output logs before starting it again.
Doesn't look as if I can do that programmatically. Shame.
 
D

Douglas J Steele

That gives you the Classname. You should be able to use the Classname in
conjunction with the FindWindow API call to get its process. See
http://access.mvps.org/access/api/api0007.htm or
http://access.mvps.org/access/api/api0025.htm for examples.

"gargoyle60" wrote in message

See whether http://access.mvps.org/access/api/api0013.htm at "The Access
Web" helps at all.

Thanks for the link, but it doesn't help. It shows the name of the
application but not its process
ID or task ID, which is what I need to stop/kill it later on.

Incidentally, the application (MBProbe) that I am starting via the Shell
gets minimized to the
systray and so I can't use AppActivate to get its focus, so I might not be
able to control it via
Access97 anyway.
All I wanted to do was start it at midnight and then shutdown (or kill it)
one minute before
midnight on the following day, then manipulate its output logs before
starting it again.
Doesn't look as if I can do that programmatically. Shame.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top