How To Call a Visual FoxPro Application Using AppleScriptLast reviewed: June 12, 1996Article ID: Q152280 |
The information in this article applies to:
SUMMARYSince Visual FoxPro for Macintosh does not create stand-alone executables as FoxPro 2.6 did, AppleScript will not be able to directly call the executable with the TELL statement. This behavior occurs because the executable will require the use of one of the Visual FoxPro Support Library files to run. AppleScript will have to TELL the Visual FoxPro Support Library.
MORE INFORMATIONThe sample AppleScript below will TELL the Visual FoxPro Support Library to open a Visual FoxPro executable named "MyProgram.exe" that is located in the MyApps folder on the Macintosh HD, activate it, and then have it display a Wait Window containing the text "Hello World!":
tell application "VFP Support Library PPC" open "Macintosh HD:MyApps:MyProgram.Exe" activate Do Script "WAIT WINDOW 'Hello World!'" end tellNote that the Visual FoxPro executable must have a READ EVENTS in it so it does not quit as soon as it is finished launching. The main program of the MyProgram.Exe file should contain code similar to the following:
\* kbon Do Mymenu.mpr READ EVENTS \* kboffThe Mymenu.mpr program has an option to CLEAR EVENTS to allow the executable to be exited. For more information on READ EVENTS and CLEAR EVENTS, see Microsoft Visual FoxPro Online Help. Applescript is manufactured by Apple Inc., a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding this product's performance or reliability.
|
Additional reference words: 3.00b VFoxMac
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |