CanEditDoc
(Engine-Level Function)
Module | ||||||||||||
Required. Any module value that specifies the document that you wish to modify. | ||||||||||||
ErrCode | ||||||||||||
Optional. Is set to a non-zero value when CanEditDoc returns a 1. The return value is a collection of 3 bits: (See: Bitwise Parameters & Operations)
|
Comments: | This function returns true if the document for the given module can be modified. The function will check to see if the date and time for the document file match that of the run file. It will return false if the document does not exist, if the dates and times are out of sync, or if the document is "Read Only". |
Example:
If Watch(1, CurrentWindow()); [ EditFlag = CanEditDoc(CurrentWindow()); ]
This script will be executed as soon as its state becomes active, and then every time the mouse moves over a new window, EditFlag will indicate whether editing can be done in that window.