PC Review


Reply
Thread Tools Rate Thread

Access97 - Control An External Application

 
 
gargoyle60
Guest
Posts: n/a
 
      3rd Jan 2012
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?
 
Reply With Quote
 
 
 
 
Douglas J Steele
Guest
Posts: n/a
 
      3rd Jan 2012
See whether http://access.mvps.org/access/api/api0013.htm at "The Access
Web" helps at all.


"gargoyle60" wrote in message
news:(E-Mail Removed)...

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?

 
Reply With Quote
 
gargoyle60
Guest
Posts: n/a
 
      3rd Jan 2012
On Tue, 3 Jan 2012 06:50:18 -0500, "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote:

>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.
 
Reply With Quote
 
Douglas J Steele
Guest
Posts: n/a
 
      3rd Jan 2012
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
news:(E-Mail Removed)...

On Tue, 3 Jan 2012 06:50:18 -0500, "Douglas J Steele"
<NOSPAM_djsteele@NOSPAM_gmail.com> wrote:

>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.

 
Reply With Quote
 
gargoyle60
Guest
Posts: n/a
 
      3rd Jan 2012
On Tue, 3 Jan 2012 10:52:11 -0500, "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote:

>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.


Wonderful, those did the trick.
Many thanks.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:50 PM.