Article ID: 140694
Article Last Modified on 12/3/2003
Tell application "Finder"
restart
End tellRUNSCRIPT "MyHardDrive:Microsoft FoxPro 2.6:restartme"This does the same thing as clicking Restart on the Special menu.
Tell application "Finder"
shutdown
End tell
#include <pro_ext.h>
#include <shutdown.h>
void FAR goodbye( ParamBlk FAR *parm )
{
ShutDwnStart();
}
FoxInfo myFoxInfo[]={
{"GOODBYE", (FPFI) goodbye, 0, ""}
};
FoxTable _FoxTable={
(FoxTable FAR *) 0,
sizeof(myFoxInfo) / sizeof(FoxInfo),
myFoxInfo
};
Once this is created, placed in a Shared Library such as Restart.mlb, and
saved to the Extensions Folder in the System Folder, it can be called with
the following code in FoxPro:
SET LIBRARY TO restart.mlb =goodbye()NOTE: Under Windows, you can co this with the ExitWindows API as referenced in the the following articles in the Microsoft Knowledge Base:
Additional query words: VFoxMac FoxMac MAC shutdown shut down
Keywords: kbcode KB140694