Difference between revisions of "Setting up scripting"
(Created page with ' === Setting up scripting === <div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; te...') |
(→Setting up scripting) |
||
Line 2: | Line 2: | ||
=== Setting up scripting === | === Setting up scripting === | ||
− | <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 | + | <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> |
− | 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 ( | + | 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. |
{| 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 | + | |+ <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> |
|- | |- | ||
− | |||
− | |||
| | | | ||
[[Image:Script_Toolbar.png]] | [[Image: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 | + | 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"> | <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 | + | |+ <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> |
|- | |- | ||
− | |||
− | |||
| | | | ||
[[Image:Script_ToolbarAppearance.png]] | [[Image:Script_ToolbarAppearance.png]] | ||
− | |||
|} | |} | ||
Line 34: | Line 28: | ||
==== 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 ( | + | 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. |
To set up Scripts Home | To set up Scripts Home | ||
Line 41: | Line 35: | ||
{| 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 | + | |+ <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> |
|- | |- | ||
| rowspan="1" colspan="2" | | | rowspan="1" colspan="2" | | ||
− | |||
− | |||
[[Image:Script_Toolbar_narrow.png]] | [[Image:Script_Toolbar_narrow.png]] | ||
− | |||
|- | |- | ||
− | |||
− | |||
| | | | ||
[[Image:Script_RefreshTheScriptListing.png]] | [[Image:Script_RefreshTheScriptListing.png]] | ||
− | |||
| | | | ||
<div class="CellBody">Refresh the script listing</div> | <div class="CellBody">Refresh the script listing</div> | ||
|- | |- | ||
− | |||
− | |||
| | | | ||
[[Image:Script_RunTheSelectedScript.png]] | [[Image:Script_RunTheSelectedScript.png]] | ||
− | |||
| | | | ||
<div class="CellBody">Run the selected script </div> | <div class="CellBody">Run the selected script </div> | ||
|- | |- | ||
− | |||
− | |||
| | | | ||
[[Image:Script_StartRecordingScript.png]] | [[Image:Script_StartRecordingScript.png]] | ||
− | |||
− | |||
− | |||
|} | |} | ||
− | <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 ( | + | <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"> |
{| 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 | + | |+ <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> |
|- | |- | ||
− | |||
− | |||
| | | | ||
[[Image:ScriptSelecting_homedir.png]] | [[Image:ScriptSelecting_homedir.png]] | ||
− | |||
|} | |} | ||
<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> | <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 <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 ( | + | 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]] |
Revision as of 20:20, 15 February 2012
Setting up scripting
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.
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.
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
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.