DOCUMENT:Q124643 12-FEB-2000 [foxpro] TITLE :How to Simulate Client-Server Apps w/Apple Events & FoxPro Mac PRODUCT :Microsoft FoxPro PROD/VER:MACINTOSH:2.6a,3.0b OPER/SYS: KEYWORDS:kb3rdparty kbnetwork ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Macintosh, version 3.0b - Microsoft FoxPro for Macintosh, version 2.6a ------------------------------------------------------------------------------- SUMMARY ======= This article gives a method you can use to simulate client-server applications by using Apple Events and FoxPro for Macintosh. With Visual FoxPro for Macintosh, you can also use this method to communicate to a Visual FoxPro Executable (.EXE.) MORE INFORMATION ================ FoxPro's ability to run AppleScripts permits developers to build a client-server application using FoxPro on both sides. Though FoxPro was not designed to act as a server, and therefore will not behave as a true client- server system would, it may be acceptable under certain circumstances such as with a small network that has few users logged in simultaneously. 1. Users of the application will have to be able to link to programs running on the computer that will run the server portion of the application. This can be achieved in one of the following two ways: - Users connecting to the Macintosh with FoxPro have to be listed in the "Users & Groups" control panel and have File Sharing and Program Linking enabled. -or- - Users can connect as "Guest". In this case, the account in the "Users & Groups" control panel has to have File Sharing and Program Linking enabled. NOTE: File Sharing and Program Linking have to be enabled in the Sharing Setup control panel for guests or registered users to be able to connect, regardless of the settings in the Users & Groups control panel. Also, the FoxPro folder and any other appropriate folders must be marked as shared by choosing the Sharing... command from the File menu. 2. The server portion of the application will be Microsoft FoxPro and must run on the server Macintosh. If it is not running, the following message is displayed: Microsoft FoxPro isn't running or program linking isn't enabled. 3. The client portion of the application will run on each workstation. It can run from a shared network folder to save disk space. The client portion runs scripts, created with Apple Script, that use this syntax: tell application "Microsoft FoxPro" of machine "server" of zone "" do script "