Go to www.awrcorp.com
Back to search page Click to download printable version of this guide.

9.6. Script Blocks

Script blocks are a mechanism to extract sections of the recording to produce scripts that can be easily executed in the Python Scripting control. To create a script block, click the Begin Script Block button on the Recorder control toolbar. In the resulting dialog box, save your script block with a unique name.

Perform the desired operations in the Analyst user interface (thus adding content to the recorder and the script block) and when done click the End Script Block button. You can access the script block from the Python Scripting control. To cancel the creation of a script block, click the Cancel Script Block button on the toolbar. You can create script blocks inside of other script blocks. Note that the End Script Block action only ends the last started script block. When you play a higher level script block in the Python Scripting control it runs all nested script blocks.

Please send email to awr.support@ni.com if you would like to provide feedback on this article. Please make sure to include the article link in the email.

Legal and Trademark Notice