Returns a number representing the mode the FileMaker product is in when the function is evaluated.
If a
script using this function runs while the file is in
Layout mode, FileMaker Pro switches to Browse mode and returns
0. If there are multiple windows open in the current
database file, each window can have its own window mode value, but results are returned for only the foreground window.