From: Link Davis
Subject: Windows API > appActivate / appList ???
Date: 
Message-ID: <38738490.1472490B@mindspring.com>
In VB/VBA...

    appActivate "Calculator"

    conveniently changes focus from the
      current app to the targeted one.


How do I do this with Allegro CL 5.0.1?



Also, can I get a list of active applications?
(so as to check for the target app before switching)


Thanks
From: Fernando
Subject: Re: Windows API > appActivate / appList ???
Date: 
Message-ID: <siq87s0b72daaoitaf9esa14i33itt7ujt@4ax.com>
On Wed, 05 Jan 2000 11:51:13 -0600, Link Davis
<·········@mindspring.com> wrote:

>In VB/VBA...
>
>    appActivate "Calculator"
>
>    conveniently changes focus from the
>      current app to the targeted one.

	I didn't know this one...
>
>How do I do this with Allegro CL 5.0.1?

	Just use the windows API: SetForegroundWindow and
SetActiveWindow.

>Also, can I get a list of active applications?
>(so as to check for the target app before switching)

	Again, use the API.  I think the name of the function is
EnumWindows.  Notice that you will have to provide a callback
function.  See Allegro's docs for this.

	If you know the class name of your target app (SciCalc for the
calculator) you can use FindWindow wich doesn't need a callback.




//-----------------------------------------------
//	Fernando Rodriguez Romero
//
//	frr at mindless dot com
//------------------------------------------------