The procedure for requesting AWR support has changed. Please read all about the new AWR product support process.
Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

This first script will be a simple script to show you the Scripting Development Environment (SDE) built into the AWR Design Environment.   

Start the

...

AWR Design Environment

Launch the AWR SDE from within the AWR Design Environment.  Your first step is to start the AWR Design Environment. Save the project to a file named MyFirstScript to help follow along with this guide.    

...

When the cursor is in a word in the scripting editor, type the F1 button for help on that keyword.  F1 Help in Scripting

Adding a Form (also called a Custom Dialog Box)

You may need to build a custom dialog for your script.  This dialog is made easy by having a graphical user interface to develop your dialog.  Scripting How-To: Adding a Custom Dialog

Dictionaries

Dictionaries are an incredibly useful concept when working with visual basic.  They are a great way collect up lists of items, especially if you don't know how many items you will need to have on your list. You can think of a dictionary like a classic dictionary; there are two pieces of information. In the classic dictionary there is a word and then the definition. In the dictionary object, there is a key and an item. The key is the word, and the item is the definition.  Please see the article for details on using dictionaries.  Scripting How-To: Using a Dictionary in AWR Scripting

File System Objects

The file system objects allow working with files and folders very quickly.   For example, if you need to process a folder and all subfolders and look for files, these utilities make that very easy.     Please see the article for details on using file system objects.  Scripting How-To: File System Objects and Scripting How-To:How Can I Easily Scan Drives, Directories, Files in a Directory, and Perform Basic File Operations

Browse to a File 

A simple command to get a dialog to box to ask the user to browse to a file.   Scripting How-To: Using GetFilePath

Browse to a Folder

Not as simple, but sometimes you want to get a folder location instead of a file location.  Scripting How-To: How to Prompt for a Folder in AWR Scripting

The Dialog Function

The dialog function allows for advanced dialog functionality such as initializing the state of the dialog, changing if items are enabled or not based on other actions, keeping the dialog open after command completion, etc.   Scripting How-To:Generating S-Parameter files from AWR Scripting and Scripting How-To: Creating a Dialog with Status Text and a Progress Bar in AWR Scripting.   Some shipping scripts also heavily use the dialog function, Generate MDIF from Collection of Files and Modify Graph Properties

Referencing Other Modules

You may want to use code in other modules; there are various ways to do this.  Scripting How-To: Referencing Subs and Functions in Other Files

Python

The examples so far have shown working with the AWR SDE.  Python is a common scripting language and could also be used to accomplish the same tasks (see AWR Scripting in Python for setup).  We show the same code to complete the same functionality in python below. 

...