opening external programs

Tony Zuccolotto anthony.zuccolotto at pstnet.com
Fri Mar 14 17:18:27 UTC 2003


Ruud,

The core of the E-Prime Runtime Engine continues to execute while
devices are suspended.   Generically you can do things like monitor the
clock, monitor the file system, or make a subset of API calls to the
Windows OS while devices are suspended.  The main things you can do or
use to solve this problem are tasks which required I/O from the devices
(e.g. no video, no realtime keyboard or mouse input, etc.)

If the Authorware app will run for a fixed amount of time then you could
just sit in a loop calling Clock.Read until the appropriate amount of
time elapses.

Another fairly easy solution might be to have your Authorware app create
some file on disk when it is done running.  Your E-Prime script could
then sit in a loop that calls Sleep for some period time and then checks
for the file to exist on disk.  When it does, it deletes the file and
then resumes devices.

For a more advanced solution (i.e. that may require the help of a
Windows programmer for more information) may be to use the FindWindow()
Win32 API function to periodically poll to see if the Authorware window
is still open.  If you can easily determine the window class name and
the titlebar text of the Authorware app then this may be the way to go.
Note that I have never tried to implement this solution myself so I just
guessing that it would work.

Hope that helps,
Tony

*** DISCLAIMER: ALL VIEWS EXPRESSED ARE MY OWN AND DO NOT NECESSARILY
REFLECT THOSE OF PSYCHOLOGY SOFTWARE TOOLS *** 

Anthony P. Zuccolotto
Vice President
Psychology Software Tools, Inc.
2050 Ardmore Boulevard
Suite 200
Pittsburgh, PA 15221-4610
Phone     412-271-5040
FAX       412-271-7077
Email     anthony.zuccolotto at pstnet.com
Internet  http://www.pstnet.com

> -----Original Message-----
> From: Custers, Ruud [mailto:R.Custers at fss.uu.nl]
> Sent: Friday, March 14, 2003 8:42 AM
> To: eprime at mail.talkbank.org
> Subject: opening external programs
> 
> Hi everyone,
> 
> I learned that it is possible to suspend e-prime with the "
> Rte.DeviceManager.Suspend " command. What I would like to do is
suspend
> e-prime to run a .exe file created in authorware. This file
automatically
> closes when it's done. After this, e-prime should become active again
to
> finish the experiment. Does anyone know how to write this in code?
> 
> Best,
> 
> Ruud.



More information about the Eprime mailing list