Scripting Resources for DigitalMicrograph™

banner

Dave Mitchell's DigitalMicrograph™ Scripting Website

Home | Scripts | Examples | Functions | Recent Updates | Tutorials | Resources | Publications | Consulting | Projects | Contact & Bio |PyJEM| Search

 

Set Operator and Specimen
Function

Allows the operator and specimen details to be set. These variables are stored in the Global Info settings and become appended to all subsequent acquired images.

Version
version:20021101, v1.0
Author
D. R. G. Mitchell
Acknowledgements
-
Comments
See the companion scripts 'Display Operator and Specimen' and 'Multiple Modify Operator and Specimen'.
System Requirements
Should be compatible with all recent versions of DigitalMicrograph.
Known Issues
-
Supported
Yes
Included Files
Main script file.
Source Code

// Script to prompt the user to enter the operator and specimen names

// These variables are set in the Global Info settings and become appended to all

// subsequent images until changed

// It is vital that these parameters are correctly set for archival using Cumulus

// D. R. G. Mitchell, Nov 2002

// adminnospam@dmscripting.com (remove the nospam to make this email address work)

 

// version:20021101

//v1.0

String operatorname, specimen

getpersistentstringnote("Microscope Info:Operator", operatorname)

getpersistentstringnote("Microscope Info:Specimen", specimen)

 

while (3>2)

{

if(!getstring("Enter the Operator's Name - be consistent!", operatorname, operatorname)) exit(0)

if (operatorname!="") break

}

 

while (3>2)

{

if(!getstring("Enter the Specimen Name ", specimen, specimen)) exit(0)

if (specimen!="") break

}

 

setpersistentStringNote("Microscope Info:Operator", operatorname)

setpersistentStringNote("Microscope Info:Specimen", specimen)

string date=getdate(0)

string time=gettime(0)

 

 

Result("\n"+"Operator and Specimen details changed at: "+time+", "+date+"."+"\n\n")

Result("Current Operator : "+operatorname+"\n")

Result("Current Specimen : "+specimen+"\n\n")