beautypg.com

Ocean Optics Jaz Scripting Language and Scripting Engine User Manual

Page 53

background image

A: Example Scripts

013-RD000-000-12- 201010

45

//
// Set the integration time

//
Display("Setting$Integration$time to$",integrationtime,"secs")

pause(2)

SetIntegrationTime(integrationtime)

//
// set a label so that we can return to this location.

//

LABEL TOP

//
//Display a message and get a spectrum

//

DisplayMsg("Collecting$Spectrum")
pause(2)

GetSpectrum(channel,testspectrum)

//

// Open a file and save the Spectrum
//

OpenFile(testfile1,ForWrite)
WriteSpectrum(testfile1,testspectrum)

CloseFile(testfile1)

//

// Display the Spectrum that we just got and
// Pause so that it can be seen

//

ShowGraph(testspectrum)
Pause(3)

//

// Put up a menu for the user to see if they

// want to get another Spectrum or exit
ShowMenu("Get another?","Exit")

OnButtonClick(choice, 30)

//

// If the user wants another spectrum goto the
// TOP Label otherwise exit

//
If (choice = 0) GOTO TOP

DisplayMsg("Exiting")
Pause(5)

END

STOP