Scripting Resources for DigitalMicrographâ„¢ |
Close All Open Images |
|
Function |
Closes all the images which are currently open. |
Version |
version:2001110, v1.0 |
Author |
D. R. G. Mitchell |
Acknowledgements |
J. Wilbrink (Gatan) for some scripting hints. |
Comments |
If the ALT is held down, images are closed without any prompts to save changes, othewise changed images will result in a prompt to save them. This functionality has been included in the DisplayTools control palette. |
System Requirements |
Should be compatible with all recent versions of DigitalMicrograph. |
Known Issues |
- |
Supported |
Yes |
Included Files |
Main script file. |
Source Code |
// Script to close all open images (hidden images are not affected). // Any images which have changed since being opened will produce a prompt // asking the users to if they wish to save the changes. // If the ALT key is held down when the script is launched the images // are closed without any prompts.
// D. R. G. Mitchell Nov 2002 // v1.0 // version:2001110 // adminnospam@dmscripting.com (remove the nospam to make this email address work) // With thanks to J. Wilbrink (Gatan) for scripting hints
Number kWINDOWTYPE_IMAGEWINDOW = 5 number numberDocs = CountDocumentWindowsOfType(kWINDOWTYPE_IMAGEWINDOW) number i
for( i = 0; i < numberDocs; ++ i ) { ImageDocument imgDoc = GetImageDocument( 0 ) image img:=getfrontimage()
if(optiondown()) imagedocumentClose(imgdoc,0) else imagedocumentClose(imgdoc,1) } |