> Hi all!
> I'm using FPW 2.5 and would like to know if there is any way to start a
> foundation read but have the read automatically start up a program.
> I assumethat accomplishing this task would require using the KEYBOARD or
> similar command to stuff the keyboard just prior to starting the foundation
> read. The keyboard stuff would then simulate the user starting a program from
> the menu.
> I can't get this method to work and I would like to know if there is a way
> using this method or another method to accomplish the same task.
> Thanks in advance!
> Jeff P.
In order to start program from foundation read you don't need to use keyboard
command. There are different ways to start a program from found. read. Here is
two of them:
- define public variables
- set neccesary "set" settings
- set public var m.exit = .F.
when fyourmenu() ;
- global cleanup code here
&& end of the main program
- here you may put rest of you procedures
- one of the bars in you menu fyourmenu() must be "Exit"
- it will execute following code
if rdlevel() = 1
m.exit = .T.
- this function will take you down one level every time and exit from the
application when you on the 1 read level (foundation read).
Second way of using foundation read is to have global var say m.nextproc
m.nextproc = "myprog"
do (m.nextproc) with m.exit
- this variation alows you execute a new program every time you are back to
founation read without having user pick one from the menu. When m.exit will be
evaluated to .T. you will exit from your app. You may change the name of the
next program being executed by assignig new value to global m.nextproc.
Hope, this will help. Tell me if any problems. Yan