Difference between revisions of "Editing and deleting scripts"

From MIPAV
Jump to: navigation, search
(Editing and deleting scripts)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=== Editing and deleting scripts ===
 
 
 
You can either edit a script while you are creating it, or you can edit any previously saved script. MIPAV saves the script in text format so that any text editor, such as Microsoft Wordpad or Notepad, can modify the file.
 
You can either edit a script while you are creating it, or you can edit any previously saved script. MIPAV saves the script in text format so that any text editor, such as Microsoft Wordpad or Notepad, can modify the file.
  
<div style="font-style: normal; font-weight: normal; margin-bottom: 5pt; margin-left: 0pt; margin-right: 36pt; margin-top: 5pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Caution</font>'''</span><nowiki>: Editing scripts may cause serious problems if the script commands are not entered correctly. This task is recommended for more advanced users. </nowiki><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 edit scripts during creation<br /></font>'''</div>
+
'''Caution''': Editing scripts may cause serious problems if the script commands are not entered correctly. This task is recommended for more advanced users.<br />
 +
 
 +
'''To edit scripts during creation'''<br />
  
 
Suppose you make an error while you are recording a script, or perhaps you've changed your mind about performing a specific action. It can be more practical to correct the problem right away.
 
Suppose you make an error while you are recording a script, or perhaps you've changed your mind about performing a specific action. It can be more practical to correct the problem right away.
  
 
To correct errors or make changes to scripts while you're creating and running them, simply click the Enable Edit button, in the Record New Script dialog box (Figure 18). Three things occur:
 
To correct errors or make changes to scripts while you're creating and running them, simply click the Enable Edit button, in the Record New Script dialog box (Figure 18). Three things occur:
 
+
1 It pauses the script execution.<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 It pauses the script execution.<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 The scripting box in the dialog box turns from gray to white to indicate that you can now type, copy, or paste information into it and delete information from it.<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 The Enable Edit button changes to the Disable Edit button. If the scripting box contains actions that you want to erase, select the actions and delete them. To add new actions, you can type them into the scripting box directly. You can also rearrange actions by copying and pasting them.<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 The scripting box in the dialog box turns from gray to white to indicate that you can now type, copy, or paste information into it and delete information from it.<br />
 +
3 The Enable Edit button changes to the Disable Edit button. If the scripting box contains actions that you want to erase, select the actions and delete them. To add new actions, you can type them into the scripting box directly. You can also rearrange actions by copying and pasting them.<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 18. Record New Script dialog box (A) before and (B) after clicking Enable Edit<br /></font>'''</div>
+
|+ '''Figure 18. Record New Script dialog box (A) before and (B) after clicking Enable Edit'''
 
|-
 
|-
 
|
 
|
Line 28: Line 29:
 
When you've finished editing the script, click Disable Edit. The record of script actions resumes. The scripting box turns gray and the Disable Edit button becomes the Enable Edit button.
 
When you've finished editing the script, click Disable Edit. The record of script actions resumes. The scripting box turns gray and the Disable Edit button becomes the Enable Edit button.
  
<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 edit previously created 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"> 1 Click the Start Recording Script icon on the scripting toolbar. The icon turns red, and the Record New Script dialog box 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 Select File &gt; Open on the Record New Script dialog box. The Open dialog box 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">  3 Select the script that you want to edit. The script appears in the scripting box on the Record New Script dialog box.<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 Enable Edit. The actions box turns from gray to white.<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 any of the actions and copy, rearrange, or delete them, or type new actions directly into the scripting box.<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 Disable Edit when you are satisfied with the script. The scripting box returns to gray.<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">  7 Continue recording actions if needed until you are satisfied the script.<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">  8 Save the script by clicking File &gt; Save. The Save dialog box 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">  9 Type the name of the script followed by the <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">.sct </font>''</span>extension in the File Name box.<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">  10 Click Save. MIPAV saves the script under the specified name.<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; 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 delete scripts (Windows specific)<br /></font>'''</div>
+
'''To edit previously created scripts'''<br />
 +
1 Click the Start Recording Script icon on the scripting toolbar. The icon turns red, and the Record New Script dialog box opens.<br />
 +
2 Select File &gt; Open on the Record New Script dialog box. The Open dialog box opens.<br />
 +
3 Select the script that you want to edit. The script appears in the scripting box on the Record New Script dialog box.<br />
 +
4 Click Enable Edit. The actions box turns from gray to white.<br />
 +
5 Select any of the actions and copy, rearrange, or delete them, or type new actions directly into the scripting box.<br />
 +
6 Click Disable Edit when you are satisfied with the script. The scripting box returns to gray.<br />
 +
7 Continue recording actions if needed until you are satisfied the script.<br />
 +
8 Save the script by clicking File &gt; Save. The Save dialog box opens.<br />
 +
9 Type the name of the script followed by the ''.sct'' extension in the File Name box.<br />
 +
10 Click Save. MIPAV saves the script under the specified name.<br />
 +
 
 +
'''To delete scripts (Windows specific)'''
  
 
If you decide at some point that you want to delete a script, go to Windows Explorer and navigate to the scripts home directory.
 
If you decide at some point that you want to delete a script, go to Windows Explorer and navigate to the scripts home directory.
  
<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 Open Windows explorer.<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 Navigate to the scripts home directory.<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 the script or scripts that you want to delete.<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 Right-click on the selected script(s).<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 Click Delete. Windows deletes the selected scripts and places them in the Recycle Bin where they stay until you empty the bin.<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>
+
1 Open Windows explorer.<br />
 +
2 Navigate to the scripts home directory.<br />
 +
3 Select the script or scripts that you want to delete.<br />
 +
4 Right-click on the selected script(s).<br />
 +
5 Click Delete. Windows deletes the selected scripts and places them in the Recycle Bin where they stay until you empty the bin.<br />
  
  
 
[[Examples]]
 
[[Examples]]

Latest revision as of 20:44, 22 February 2012

You can either edit a script while you are creating it, or you can edit any previously saved script. MIPAV saves the script in text format so that any text editor, such as Microsoft Wordpad or Notepad, can modify the file.

Caution: Editing scripts may cause serious problems if the script commands are not entered correctly. This task is recommended for more advanced users.

To edit scripts during creation

Suppose you make an error while you are recording a script, or perhaps you've changed your mind about performing a specific action. It can be more practical to correct the problem right away.

To correct errors or make changes to scripts while you're creating and running them, simply click the Enable Edit button, in the Record New Script dialog box (Figure 18). Three things occur: 1 It pauses the script execution.
2 The scripting box in the dialog box turns from gray to white to indicate that you can now type, copy, or paste information into it and delete information from it.
3 The Enable Edit button changes to the Disable Edit button. If the scripting box contains actions that you want to erase, select the actions and delete them. To add new actions, you can type them into the scripting box directly. You can also rearrange actions by copying and pasting them.

Figure 18. Record New Script dialog box (A) before and (B) after clicking Enable Edit

Script EnableEdit.png

Script DisableEdit.png

A
B


When you've finished editing the script, click Disable Edit. The record of script actions resumes. The scripting box turns gray and the Disable Edit button becomes the Enable Edit button.

To edit previously created scripts
1 Click the Start Recording Script icon on the scripting toolbar. The icon turns red, and the Record New Script dialog box opens.
2 Select File > Open on the Record New Script dialog box. The Open dialog box opens.
3 Select the script that you want to edit. The script appears in the scripting box on the Record New Script dialog box.
4 Click Enable Edit. The actions box turns from gray to white.
5 Select any of the actions and copy, rearrange, or delete them, or type new actions directly into the scripting box.
6 Click Disable Edit when you are satisfied with the script. The scripting box returns to gray.
7 Continue recording actions if needed until you are satisfied the script.
8 Save the script by clicking File > Save. The Save dialog box opens.
9 Type the name of the script followed by the .sct extension in the File Name box.
10 Click Save. MIPAV saves the script under the specified name.

To delete scripts (Windows specific)

If you decide at some point that you want to delete a script, go to Windows Explorer and navigate to the scripts home directory.

1 Open Windows explorer.
2 Navigate to the scripts home directory.
3 Select the script or scripts that you want to delete.
4 Right-click on the selected script(s).
5 Click Delete. Windows deletes the selected scripts and places them in the Recycle Bin where they stay until you empty the bin.


Examples