Vizard scripts can be run using the run icon  in the standard 
 toolbar, selecting the Script > Run 
 menu option, or by using the F5 keyboard shortcut.
 in the standard 
 toolbar, selecting the Script > Run 
 menu option, or by using the F5 keyboard shortcut.
The Script menu also contains the following run options:
Run docked: Use this to dock the graphics window within the Vizard IDE. See Docking a running script for more information.
Run with Python: Run a non-Vizard script with the standard Python interpreter. Vizard modules will not be available.
Run with Vizard 4.0: Run a script using the Vizard 4.0 engine. This option is only available if Vizard 4.0 is installed on the machine.
Run with Vizard 5.0: Run a script using the Vizard 5.0 engine. This option is only available if Vizard 5.0 is installed on the machine.
For debugging purposes, a script can be run in debug mode. See the Vizard debugger section for more information.
All run options automatically save the script prior to running it. If there is no saved file associated with the script, a Save As dialog will be displayed.
By default, all open documents will be saved when running a script. This is useful when your program is split up into multiple modules and you want to ensure you are running with the latest changes. This behavior can be disabled using the Save all documents when running script setting in the Options window.
If you attempt to run a script that is already running, a dialog with Relaunch, Focus, and New Instance options will be displayed:
             
        
Relaunch is useful for running a script that's been modified while the graphics window was open or to start the script from the beginning. If you forgot the script is running minimized or behind other windows, you can use the Focus option to bring it to the foreground. New Instance will run the script and keep the existing script running as well.
The Run Arguments toolbar allows specifying an arbitrary string that will be passed as optional arguments to the script when it is run. Passing arguments allows you to change the behavior without modifying the script. For example, if your script logs certain data to a file, you can pass the name of the log file as an argument:
             
        
Note: Run arguments are separated by spaces. If an argument value contains a space then you need to place double quotation marks around the argument when constructing your string.
To access the run arguments within your Vizard script, use the Python sys.argv list. The first value of the list is the name of the script that is running. The remaining elements of the list are all the arguments passed to your script. Continuing with the above example, you would use the following code to access the name of the log file argument:
You can pass any number of arguments to your script, and they will be appended to the sys.argv list. The following code shows how to iterate and print all the available arguments: