If your script terminates with an input-output pipe left open, Script Debugger offers you the chance to close it. This situation can arise in two situations:
The script has called the open for access
Scripting Addition command without calling close access
on the same file.
The script has initiated a transaction (with transaction
) but never completed the transaction, either by committing it or by rolling it back.
When the script is terminated in this situation, Script Debugger presents its Leaks dialog. The dialog contains a list of open files (“Leaked Resources”).
Your options are:
Close All. All open files are closed (and transactions are committed), and the dialog is closed. This will be your usual choice.
Close. The selected open file is closed (or the transaction is committed).
Abort. The selected transaction is rolled back.
Forget. The selected leak is removed from the list with no action taken. This would be a very unusual thing to do, as the leak is left open.
If the script terminates because of an error, the error dialog is shown instead of the Leaks dialog. To close a leak left open by the termination of the script, summon the Leaks dialog manually: