Difference between revisions of "Setting up scripting"

From MIPAV
Jump to: navigation, search
(Setting up scripting)
 
Line 1: Line 1:
=== Setting up scripting ===
+
Before you start create, edit, run, or delete scripts, you need to <br />
 
+
1 Select the scripts home directory, refer to "Scripts Home";<br />
<div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> Before you start create, edit, run, or delete scripts, you need to <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  1 Select the scripts home directory, refer to "Scripts Home";<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  2 And display the scripting toolbar (optional, but very helpful).<br /></font></div><div style="font-style: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 14pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> To display the scripting toolbar<br /></font>'''</div>
+
2 And display the scripting toolbar (optional, but very helpful).<br />
  
 +
'''To display the scripting toolbar'''<br />
 
Like the paint toolbar, you can choose to show it on an as-needed basis or not to show it on an as-needed basis. To display the scripting toolbar on an as-needed basis, select Toolbars &gt; Scripting Toolbar (Figure 1) MIPAV.
 
Like the paint toolbar, you can choose to show it on an as-needed basis or not to show it on an as-needed basis. To display the scripting toolbar on an as-needed basis, select Toolbars &gt; Scripting Toolbar (Figure 1) MIPAV.
  
 
{| border="1" cellpadding="5"
 
{| border="1" cellpadding="5"
|+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 1. Scripting Toolbar command on the Toolbar menu<br /></font>'''</div>
+
|+ '''Figure 1. Scripting Toolbar command on the Toolbar menu'''
 
|-
 
|-
 
|
 
|
Line 14: Line 15:
 
The scripting toolbar immediately appears beneath the VOI toolbar or, if the Paint toolbar is also displayed, immediately below the Paint toolbar. See Figure 2.
 
The scripting toolbar immediately appears beneath the VOI toolbar or, if the Paint toolbar is also displayed, immediately below the Paint toolbar. See Figure 2.
  
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
 
  
 
{| border="1" cellpadding="5"
 
{| border="1" cellpadding="5"
|+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 2. The Scripting toolbar is highlighted<br /></font>'''</div>
+
|+ '''Figure 2. The Scripting toolbar is highlighted'''
 
|-
 
|-
 
|
 
|
Line 23: Line 23:
 
|}
 
|}
  
<br /></font></div>
 
  
 
==== Scripts Home ====
 
==== Scripts Home ====
  
The <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">scripts home</font>''</span> is the directory where you store scripts, and from which you run them. After you select a scripts home, the name of one of the scripts (which are ordered alphabetically) in that directory appears after Current Script on the scripting toolbar (Figure 3). If there is more than one script in the directory, Current Script becomes a list box from which you can select the script to run.
+
The ''scripts home'' is the directory where you store scripts, and from which you run them. After you select a scripts home, the name of one of the scripts (which are ordered alphabetically) in that directory appears after Current Script on the scripting toolbar (Figure 3). If there is more than one script in the directory, Current Script becomes a list box from which you can select the script to run.
  
 
To set up Scripts Home
 
To set up Scripts Home
 
+
1 Start MIPAV. The initial MIPAV window opens.<br />
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  1 Start MIPAV. The initial MIPAV window opens.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  2 Open an image. The expanded MIPAV window appears.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  3 Select Toolbars &gt; Scripting Toolbar. The scripting toolbar appears.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> A dimmed rectangle appears immediately following the words <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">Current Script </font>''</span>in the scripting toolbar.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
+
2 Open an image. The expanded MIPAV window appears.<br />
 +
3 Select Toolbars &gt; Scripting Toolbar. The scripting toolbar appears.<br />
 +
A dimmed rectangle appears immediately following the words ''Current Script'' in the scripting toolbar.<br />
  
 
{| border="1" cellpadding="5"
 
{| border="1" cellpadding="5"
|+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 3. The Scripting toolbar<br /></font>'''</div>
+
|+ '''Figure 3. The Scripting toolbar'''
 
|-
 
|-
 
| rowspan="1" colspan="2" |
 
| rowspan="1" colspan="2" |
Line 53: Line 54:
 
|}
 
|}
  
<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  4 Click Scripts Directory... The Choose Directory dialog box (Figure 4) appears. <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
+
4 Click Scripts Directory... The Choose Directory dialog box (Figure 4) appears. <br />
  
 
{| border="1" cellpadding="5"
 
{| border="1" cellpadding="5"
|+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 4. Choose Directory dialog box. Note that it shows only directories, not individual files<br /></font>'''</div>
+
|+ '''Figure 4. Choose Directory dialog box. Note that it shows only directories, not individual files'''
 
|-
 
|-
 
|
 
|
 
[[Image:ScriptSelecting_homedir.png]]
 
[[Image:ScriptSelecting_homedir.png]]
 
|}
 
|}
 +
5 Select a directory in which to store your scripts.<br />
 +
6 Click Open. The directory opens and the Choose Directory dialog box closes. <br />
  
<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  5 Select a directory in which to store your scripts.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  6 Click Open. The directory opens and the Choose Directory dialog box closes. <br /></font></div>
+
After you've selected a ''scripts home'' and run a script for the first time, Current Script becomes a list box that shows the name of a script in the scripts home directory (Figure 3). After creating more scripts, you can select the one you want to run from Current Script.
 
+
After you've selected a <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">scripts home</font>''</span> and run a script for the first time, Current Script becomes a list box that shows the name of a script in the scripts home directory (Figure 3). After creating more scripts, you can select the one you want to run from Current Script.
+
  
 
[[Planning scripts]]
 
[[Planning scripts]]

Latest revision as of 21:59, 21 February 2012

Before you start create, edit, run, or delete scripts, you need to
1 Select the scripts home directory, refer to "Scripts Home";
2 And display the scripting toolbar (optional, but very helpful).

To display the scripting toolbar
Like the paint toolbar, you can choose to show it on an as-needed basis or not to show it on an as-needed basis. To display the scripting toolbar on an as-needed basis, select Toolbars > Scripting Toolbar (Figure 1) MIPAV.

Figure 1. Scripting Toolbar command on the Toolbar menu

Script Toolbar.png

The scripting toolbar immediately appears beneath the VOI toolbar or, if the Paint toolbar is also displayed, immediately below the Paint toolbar. See Figure 2.


Figure 2. The Scripting toolbar is highlighted

Script ToolbarAppearance.png


Scripts Home

The scripts home is the directory where you store scripts, and from which you run them. After you select a scripts home, the name of one of the scripts (which are ordered alphabetically) in that directory appears after Current Script on the scripting toolbar (Figure 3). If there is more than one script in the directory, Current Script becomes a list box from which you can select the script to run.

To set up Scripts Home 1 Start MIPAV. The initial MIPAV window opens.
2 Open an image. The expanded MIPAV window appears.
3 Select Toolbars > Scripting Toolbar. The scripting toolbar appears.
A dimmed rectangle appears immediately following the words Current Script in the scripting toolbar.

Figure 3. The Scripting toolbar

Script Toolbar narrow.png

Script RefreshTheScriptListing.png

Refresh the script listing

Script RunTheSelectedScript.png

Run the selected script

Script StartRecordingScript.png

4 Click Scripts Directory... The Choose Directory dialog box (Figure 4) appears.

Figure 4. Choose Directory dialog box. Note that it shows only directories, not individual files

ScriptSelecting homedir.png

5 Select a directory in which to store your scripts.
6 Click Open. The directory opens and the Choose Directory dialog box closes.

After you've selected a scripts home and run a script for the first time, Current Script becomes a list box that shows the name of a script in the scripts home directory (Figure 3). After creating more scripts, you can select the one you want to run from Current Script.

Planning scripts