docServerUserLandCom picture
Contents
Frontier Site

system.misc.closeWindow

Syntax system.misc.closeWindow (title)

Params title is the title of a Frontier window that is being closed.

Action This script can examine the window title, take any appropriate action, and decide whether or not to allow it to close.

Returns True to allow the window to be closed, false to prevent it from closing.

Examples on closeWindow (title)
if title == file.fileFromPath (Frontier.getFilePath ())

fileMenu.save () // save changes unconditionally

window.setModified (title, false) // don't save changes

return (true)

Notes This is a user-supplied script that Frontier calls when a window is about to be closed.

The misc.closeWindow script is not called if another script caused the window to be closed.

If Frontier is quitting, closeWindow will be called with the title of the main window, which is always file.fileFromPath (Frontier.getFilePath ()).


© Copyright 1992-2026 UserLand Software. Email: webmaster@userland.com.