0% found this document useful (0 votes)
70 views5 pages

Origin Script Tool and Toolbar

This document provides instructions for installing and using the Origin Script Tool and Toolbar. The Script Tool contains example LabTalk scripts organized into categories and provides a user interface for selecting, viewing, and running scripts. The Script Toolbar contains buttons for useful LabTalk scripting functions like opening the script tool, editor, and documentation. Pre-defined scripts are included in categories like Analysis, Excel, Graph, and more.

Uploaded by

Hyun Deog Yoo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
70 views5 pages

Origin Script Tool and Toolbar

This document provides instructions for installing and using the Origin Script Tool and Toolbar. The Script Tool contains example LabTalk scripts organized into categories and provides a user interface for selecting, viewing, and running scripts. The Script Toolbar contains buttons for useful LabTalk scripting functions like opening the script tool, editor, and documentation. Pre-defined scripts are included in categories like Analysis, Excel, Graph, and more.

Uploaded by

Hyun Deog Yoo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 5

Origin Script Tool and Toolbar

This document contains installation and usage instructions for the Origin Script Tool and
Toolbar. The Origin Script Tool was designed to meet a number of customer needs. It is
primarily intended as a vehicle to provide example LabTalk scripts. This release of the Origin
Script Tool contains twenty-four well documented scripts that demonstrate how to use various
LabTalk commands and object properties and methods. The Script Tool is also intended to be a
convenient user interface for organizing, selecting, displaying, and executing any one of a large
number of LabTalk scripts. Finally, a number of the example scripts provided are useful
programs in and of themselves. The Origin Script Toolbar provides additional functionality that
developers of LabTalk scripts may find useful.

Contents

I. INSTALLATION .................................................................................................................. 2
II. THE ORIGIN SCRIPT TOOLBAR ........................................................................................ 2
III. THE ORIGIN SCRIPT TOOL .............................................................................................. 3
IV. ADDING NEW CATEGORIES AND SCRIPTS ...................................................................... 4
V. PRE-DEFINED SCRIPTS BY CATEGORY ............................................................................. 5

• Page 1 of 5 •
I. Installation
To install the Origin Script Tool and Toolbar:
1. Download and save the Origin Script Tool and Toolbar from the OriginLab web site. The
downloaded file is named OScriptTool.opk.
2. Launch Origin 6.1 (or later) and then left-click on and drag the downloaded file
OScriptTool.opk into the Origin work space. The Origin Script Tool and Toolbar will
automatically be installed.
Installing the Origin Script Tool and Toolbar creates a \Scripts subfolder in the Origin software
folder. The \Origin\Scripts subfolder contains some Script Tool and Toolbar source files and an
additional subfolder for each category of scripts in the Origin Script Tool. Each category
subfolder contains the script files (files of type *.OGS) for the scripts in that category. For
example, the \Origin\Scripts\Analysis subfolder contains the script files for all the scripts in the
Analysis category of the Origin Script Tool.

II. The Origin Script Toolbar


The Origin Script Toolbar is an Origin user defined toolbar intended to aid in the development of
LabTalk scripts.

Each button on the Origin Script Toolbar performs a function useful to LabTalk programmers.

The Script Tool button toggles the Origin Script Tool open and closed. The Origin Script
Tool is a convenient user interface for organizing, selecting, displaying, and executing any one
of a large number of LabTalk scripts. See "III. The Origin Script Tool" on page 3 for a complete
description.

The Script Window button functions the same as the Script Window button on the Standard
toolbar. It toggles the Script Window hidden or shown.

The Open Origin Folder button opens the Origin software folder in Windows Explorer.

The Open LabTalk Editor button opens a LabTalk Editor window (opens Code Builder in
version 7). Files of type *.OGS, *.OPS, *.INI, *.TXT, *.OMG, and *.* can be browsed for and
opened.

• Page 2 of 5 •
The Open NotePad button opens a NotePad window. Files of type *.OGS, *.OPS, *.INI,
*.TXT, *.OMG, and *.* can be browsed for and opened.

The New LabTalk Editor button creates a new, empty LabTalk Editor window (opens
Code Builder in version 7).

The New NotePad button creates a new, empty NotePad window.

The Script Toolbar Documentation button opens an Adobe Acrobat Reader file which
contains documentation for the Origin Script Tool and Toolbar.

III. The Origin Script Tool


The Origin Script Tool is a convenient user interface for organizing, selecting, displaying, and
executing any one of a large number of LabTalk scripts. Categories of scripts can be deleted and
added. Scripts can be deleted, edited, added, and executed. Several of the twenty-four example
scripts provided are useful programs in and of themselves. Others demonstrate how to use
various LabTalk commands and objects.

The Category and Script radio buttons specify whether the Delete, Edit, Add, and Run buttons
operate on the selected category or on the selected script. To select a script first select its
containing category in the Category combination box and then select the script in the Script
combination box. A brief message describing the script's function is displayed on the Origin
Status Bar when the script is selected. Up to five space separated arguments can be passed to an
executed script by entering them in the Arguments edit box. Arguments passed to an executed
script will be remembered the next time that script is selected.
To delete the selected category or add a new category enable the Category radio button and then
click the Delete or Add button. Deleting a category removes it from the Category combination
box but does not actually delete the category's subfolder or script files. A deleted category can
be re-added later but any scripts in the deleted category will also need to be re-added. Adding a
new category automatically creates a subfolder in the \Origin\Scripts folder having the path

• Page 3 of 5 •
\Origin\Scripts\<CategoryName>. See "IV. Adding New Categories and Scripts" on page 4 for a
more complete description.
To delete, edit, add, or run a selected script enable the Script radio button and then click the
Delete, Edit, Add, or Run button. Deleting a script removes it from the Script combination box
but does not actually delete its script file. A deleted script can be re-added to its former category
without having to recreate the script file. Adding a new script to a category automatically creates
an appropriately named and preformatted script file to the selected category's subfolder. The
new script file is opened in Code Builder and all that is needed is to enter the LabTalk code and
then save the file. See "IV. Adding New Categories and Scripts" below for a more complete
description.
Editing a script opens its file in Code Builder. Scripts that come with the Origin Script Tool can
be edited and used for examples. Each script file is well documented and contains a complete
description, a list of run time assumptions, and a list of required and optional arguments that can
be passed. Running a script executes the selected script file to completion and then returns
control to the Script Tool.
To close the Script Tool click the close window system icon in the upper right corner of the
Script Tool or click the Script Tool button on the Script Toolbar to toggle the Script Tool
closed.

IV. Adding New Categories and Scripts


To add a new category enable the Category radio button and then click the Add button. To add a
new script enable the Script radio button, select the category in which you want to add the new
script, and then click the Add button. After clicking the Add button the appropriate modal dialog
box will open:

To add a category or script simply enter the desired name and click OK. New category and
script names must not contain any spaces, tabs, or special characters. Category and script names
must contain only letters and numbers. Category names must be unique within the tool and
Script names must be unique within each category.
If you want to insert a new category or script immediately above the currently selected item in its
combination box then check the Insert checkbox. If you want to append a category or script to
the bottom of its combination box then uncheck the Insert checkbox. The state of the Insert
checkbox is remembered whenever the OK button is clicked. Clicking the Cancel button closes
the Add New Category/Script dialog box and takes no action.

• Page 4 of 5 •
V. Pre-defined Scripts by Category
The Origin Script Tool contains the following pre-defined categories and scripts:
Analysis - DataIntersect, FitPLabel, LFIntersect, Normalize, Redirect2Notes, VLine
Excel - PlotLabel
Graph - LabelXY
Import - Batch
Matrix - Multiply
Numeric - ADDDateAndTime, Factorial, SeparateDateTime
String - Parse
Utility - ProgressLoop1, ProgressLoop2, RepairOPJ
Window - ListNonMin
Worksheet - AveDupXY, CopyRows, DelDupXRows, DeleteRows, DelHiddenDatasets,
Row2Label
UserDefined - none

• Page 5 of 5 •

You might also like