Macros: Error Checking

Top  Previous Topic  Next Topic

 

This is a Level 4 and higher feature.

On-line shipment processing is reached by selecting SHIPPING TOOLS >> ON-LINE SHIPMENT PROCESSING from the Menu Bar on top of the Main Invoice Screen.  Macros are used to automatically complete on-line forms.  For general information: see Macros.  The discussion below is about error checking in macros.

The macros as distributed with AnyOrder have error checking turned off, but you can turn it on to try to trace down an error.

1.  First start the Internet Macros browser.  You can use the "Internal Browser" button on the On-line Shipment Processing dialog box to activate the Internet Macros Browser.

2. When the browser appears, highlight the desired macro on the left side of the browser.

3. Click on the "Edit" tab and then the "EDIT" button.  Windows notebook will start up with the macro in place.  Be careful that you don't accidentally change anything while looking the contents of a macro.

4. Page down until you see "SET !ERRORCONTINUE YES."  Place a single quote in front of it.  The single quote means:  "don't run this command."  In other words, in this case, it turns error checking on.  Save the Macro.

Now that you've turned on error checking, go ahead and run the Macro on the shipper's website.  If an error occurs while running the macro, a pink box will appear on the upper left hand corner of the Internet Macro's browser.

Indicated in the pink box will be the line number from the macro where the error occurred.  For example you might see the phrase:  "Error in Line 9."

Note that you'll also see an "On-line Help" button in the pink box.  The button won't be of much help.  That's an iOpus feature (the company that developed Internet Macros) and they really don't have a good system developed for analyzing these types of error messages.  C'est La Vie.

Now that you have the line number, take a look at the macro.

1.  Click on the EDIT button again.

2.  Count down from the top.  Count only those lines without single quotes.  You'll need to add one to your count.  Internet Macros doesn't count the first command for some reason.

When you reach the line number, this will be the command that caused the error.  By looking closely at the command and reading the comments, you may be able to tell where on the web form the error occurred.

For example, let's say the following line caused the error:

TAG POS=1 TYPE=A ATTR=TXT:Enter<SP>New<SP>Address  

This is a TAG command.  The word "TAG" tells us that.  To understand the TAG command, you'll need to look at the Internet Macros User Manual (available by clicking HELP in the Internet Macros Browser).

The TAG command is described in the section "Macro Commands Overview."  To get there, you can use the index and click on the word "TAG."

Admittedly the documentation is a little vague on the purpose of a TAG command, but if you examine the macros that come with AnyOrder, you'll see that it's used extensively.  TAG commands do much of the work of filling out forms.

When you look at the parts of the TAG command in the help documentation, you'll see:  POS.  POS is almost always 1.  There's a description of it in the documentation, but it's really not too important in this case, so we'll move on to TYPE = A.

There's a short note in the documentation that tells us that TYPE= A is used for links.  Now we know what's going on here.  This command is clicking a link.

Which link is it?  That's what the ATTR part of the command tells us:

The "ATTR=TXT" part means we're dealing with a text link.

And the "Enter<SP>New<SP>Address" part is the name of the link.

The <SP> mean space.  It makes the text look a little funny, but we dealing with HTML language and that's how HTML indicates a space.

The name of the link (which we now know is "Enter New Address") may show on the webpage.  OR, you may have to look directly at the underlying HTML code to find the name.  Most of the time, however, you can look at the webpage and tell which field on the form ATTR is referring to.

ATTR, then, tells us where the problem has occurred.  In this case, the ATTR text shows up word for word on the webpage: Enter New Address.

The example that we are using here comes from the UPS Autofill macro.  The "Enter New Address" link opens up the Address Book and allows you to enter a new address.

What does all this tell us?  It tells us there's problem with the link.  Does the link exist on the page you're looking at?  If the link is not there, then you've located the source of the problem.

 

Other On-line Shipment Processing Links:

On-line Shipment Process - General Information

WebLinks (WebLinks Properties Dialog Box)

Trouble Shooting On-line Shipment Problems

Macros (Developing Your Own or Editing Existing Macros)

Shipment Form