AccuZIP6 5.0 Scripting Tutorial

Welcome to the AccuZIP6 5.0 Scripting Tutorial!  It is highly recommended that you first complete the Introductory Tutorial in the Getting Started section prior to completing this tutorial.  The Basic Tutorial will give you a firm understanding of the program functions, and will make automating those functions much simpler.  If you already have a working knowledge of AccuZIP6, then the Introductory Tutorial may not be necessary.  This scripting tutorial will demonstrate how to automate the same processes that were used in the Introductory Tutorial, with the only difference being right in the beginning.  When scripting, you do not launch from the Open/Create Window, and there's no option for the Open/Create Window in the script editor, so we'll use File>Open List to open a new list.  Let's get started!

 

 

Scripts Window

 

 

 

 

TIP!

Give your scripts appropriate names that make sense to you.  By default, it uses a date/time stamp naming convention, but rename it to something that will remind you of what the process does.  A client that requires a consistent process be used every time is a perfect example of how scripting can save you time.  Create a script, rename it to your client's name and run it whenever their jobs come in!

 

 

 

 

 

This is the window that you'll become very familiar with if you're going to be scripting.  The layout is fairly basic; select a menu, and then choose the menu item you'd click on if you were running AccuZIP6 5.0 manually.  Any time you're scripting a process in AccuZIP6 5.0, the first event you'll want to create is opening a data source.

 

 

Open Setup window within the Script Editor

 

 

Open Dialog

 

 

The file name and path will appear in the Open Setup screen, and the program will note that the file has been determined to be a Comma-Separated Text file.  Much like the standard tutorial, we will now proceed to map the fields.

 

 

 

The file that we are opening contains a Header Record.  In this case, manual field mapping is not necessary, because the field names appear in the first record in the file.  This is called a Header Record.  When you have a Header Record in your file that matches the Auto Field Maps table, you can simply check the Use Header check box and the field names in the first record are used as the AccuZIP6 field names for the database.

 

 

TIP!

One of the key features available within the scripting environment that you won't find through manual use of the software is the "Auto" checkbox.  While in the script editor, you'll be able to check the box, which allows the script to run the event(s) automatically.  If you want an event to run without any interaction from the user, check the "Auto" checkbox.  If you wish to have the script pause briefly and wait for input from the user, leave the box unchecked.  In this tutorial, we'll set each event up to run automatically.

 

 

 

Congratulations!  You've just created your first automated event within the AccuZIP6 5.0 Scripting Engine.  Each event that you add will follow the same set of instructions: selecting a menu, a menu item, adding the selected event to the Event Sequence, modifying the settings, and lastly saving the event.  We can now set up the rest of the events for the tutorial!

 

 

 

For more information on the optimize database options, see Optimizing the Database.

 

For the purposes of this tutorial, we'll leave the default options selected.

 

 

 

We're halfway there, now!  As you can see, using the scripting engine within AccuZIP6 5.0 is very simple, yet very powerful.  At this point, you should probably start to feel comfortable with the repetition of steps to add events to the sequence and settings modification.  If you still have questions, feel free to review earlier steps, or visit our Online Chat for clarification!

 

Continuing with the Scripting Tutorial, we'll now move on to Validating and Presorting.

 

 

 

As with previous steps, the default options (with the exception of the Auto Run option) will be fine for the purposes of this tutorial.  If you desire clarification or information on the options available, see Validating the Data.

 

In the Validate Records event for a script, you'll have to do something new: saving the settings.  In the lower middle portion of the window, you'll see the "Saved Settings" area.  To run a script with a validation event automatically, you'll have to create a saved setting for AccuZIP6 5.0 to use.  To do so, perform the following steps:

 

 

 

 

 

We'll now create the last tutorial event, the Presort event.

 

 

 

If you haven't previously completed the Introductory Tutorial, that's okay!  You'll just have a few extra steps to take at this point.

 

 

Performing the previous two steps will create the saved settings that the script editor needs to process the presort automatically.

 

 

 

Congratulations, you have created your first automated script within AccuZIP6 5.0!  Now it's time to save the script and run it to view the results of the tutorial.  If all previous steps were performed, you will be allowed to return to the Scripts window and simply click "Run Script", at which point AccuZIP6 5.0 will run through the import, optimization, validation, and presort events.  You'll be presented with the Print Presort window, as if you had just manually processed a file!

 

 

 

The tutorial script will already be highlighted for you.

 

 

You can then open up My Computer on a Windows PC to navigate to the C:\Program Files\AccuZIP6 5.0\Demo\Presort Folder location to see the resulting files that were generated.

 

Congratulations on creating your first automated script within AccuZIP6 5.0!!!  It is recommended that you experiment with the settings before attempting to run a live job, but if you require assistance with scripting, or even general technical support, you can easily reach our highly trained technical support staff via any of the options listed in our contact information.