Built-in Function handler
Use the stacks function to find out which stack files are open.
Since unsaved stacks have no file name, the file names of unsaved stacks are not included in the list. Instead, each unsaved stack is represented by a blank line in the list.
The file paths of substacks are included, but the stack names themselves are not. This means that if more than one stack in a file is open, that file's path appears more than once in the list returned by the stacks function.
The list includes any open LiveCode windows (such as the message box and menu bar). It also includes stacks that have been opened during the current session and then closed, unless the stack's destroyStack property is set to true.