Important: The information in this document is obsolete and should not be used for new development.
Setting the Server Application's User Interaction Preferences
The server sets its user interaction preferences by using theAESetInteractionAllowedfunction. This function specifies the conditions under which your application is willing to interact with the user.
myErr := AESetInteractionAllowed(level);Thelevelparameter is of typeAEInteractAllowed.
TYPE AEInteractAllowed = (kAEInteractWithSelf, kAEInteractWithLocal, kAEInteractWithAll);You can specify one of these values for the interaction level:
Flag Description kAEInteractWithSelf Your server application can interact with the user in response to an Apple event only when your application is also the client application--that is, only when your application is sending the Apple event to itself. kAEInteractWithLocal Your server application can interact with the user in response to an Apple event only if the client application is on the same computer as your application. This is the default if the server application does not call the function AESetInteractionAllowed.kAEInteractWithAll Your server application can interact with the user in response to an Apple event sent by any client application on any computer. If the server application does not set the user interaction level,
AEInteractWithUseruseskAEInteractWithLocalas the value.If the application sends itself an Apple event (that is, if the application is both the client and the server) without setting the
kAENeverInteractflag,AEInteractWithUseralways allows user interaction. If the client application is a process on the local computer and specifieskAECanInteractorkAEAlwaysInteract, and if the server has set the interaction level tokAEInteractWithLocalorkAEInteractWithAll, thenAEInteractWithUserallows user interaction. If the client is a process on a remote computer on the network and specifieskAECanInteractorkAEAlwaysInteract,AEInteractWithUserallows user interaction only if the server specified thekAEInteractWithAllflag for the interaction level. In all other cases,AEInteractWithUserdoes not allow user interaction.