Macros (On-line Shipment Processing) |
![]() ![]() ![]() |
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 (which are discussed below) are used to automatically complete on-line forms. What Are Macros? To autofill on-line forms, AnyOrder uses a subsidiary program called Internet Macros developed by the iOpus Company. When the Internet Macros browser is activated, a list of macros appears on the left side of the browser. Macros are similar to tape recordings. In this case, when you "play" the macro, it fills out an on-line form. If you'd like to look directly at the documentation that comes with iOpus Internet Macros, you can reach it by clicking START on the Windows desktop. Select PROGRAMS >> AnyOrder Internet >> User Manual. We'll try to provide you with enough information in AnyOrder's help materials to get you started, but the iOpus material is handy if you need more details. Note that Internet Macros need to be installed to access their documentation. If it's not installed, you can install it by selecting SHIPPING TOOLS >> ON LINE SHIPMENT PROCESSING. Click on "Internal Browser." AnyOrder comes with a number of pre-made macros. However you may wish to build your own for shipping companies not included with AnyOrder. You also may wish to tweak existing macros. Extensive help documentation has been included with the Internet Macro program. Use the documentation to create you own macros. Also available to help you create your own macros is a macro recorder. That's accessed by selecting TOOLS >> RECORD from the Internet Macros browser. The Internet Macros browser is activated from AnyOrder by going to On-line shipment processing and clicking on the "Internal Browser" button at the bottom of the bottom of the dialog box. You can go to on-line form at the shipper website, turn on the macro and then fill out the form. After filling out the on-line, turn off the macro recorder. This gives you the basic code which you can then modify. (You can use the examples that come with the program to help you make the modifications.) Note that since Internet Macros was developed by the iOpus Company and not by us, we don't provide support for developing your own macros. Moreover since Internet Macros is provided free with AnyOrder, iOpus is also unable to provide support. (If you need a macro and do not want to develop your own, check with us for a cost estimate.) Thus, you are on your own when it comes to developing your own macros. But if you don't mind dabbling in a bit of programming, you'll find the iOpus documentation very complete. Additionally, the built in macros have been fully documented with the intention to help you develop your own. You'll find lots of helpful information included in the macro itself. To look at a macro, use the EDIT button in the Internet Macros browser. You can access the iOpus documentation by clicking START on the Windows desktop. Select PROGRAMS >> AnyOrder Internet >> User Manual. The help system and example files found in AnyOrder's Internet directory often refer to a special developer's program available from iOpus. The developer's program includes a robust set of tools to develop and program macros. That said, we want to reassure you that you can create macros without purchasing extra software. But if you enjoy the features offered by Internet Macros--and desire to get deeper into the macro programming language--you may wish to visit their website. Links to their website and information on ordering the special developer's program are found in the Internet Macro Browser. Macro File Format & Where Macros are Stored Macros are simple text files. You can use any word processor to create macros. When using a word processor, you'll want to be sure to save the macro as a "Text" file. Macros should be saved with the ".iim" extension, for example: UPS-Autofill.iim. To make a macro accessible to the Internet Macro's browser, copy the macro to the C:\AnyOrder\Internet\Macros directory. Any file with an "iim" extension that is found in this directory will appear on the macro list on the left side of the Internet Macros browser. Viewing or Editing Existing Macros You can edit an existing macro by doing the following: 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 is on, highlight the desired macro on the left side of the browser. 3. Click on the "Edit" tab. Then click on the "EDIT" button. 4. When you click on EDIT, Internet Macros will start Windows Notebook and you'll be able to make changes in the Macro. All the macros listed on the left side of the browser are kept in the following directory: C:\AnyOrder\Internet\Macros. When you edit a macro, you are editing a file with an extension of "iim" found in that directory. An Example of a Macro The following sample macro is the UPS Autofill macro (UPS-Autofill,iim) that comes with the program. You can view the contents of UPS-Autofill or any macro by using the "EDIT" button in the Internet Macros browser or by opening the macro in a word processor (see "View or Editing Existing Macros," above). Note that normally comments (lines that you don't want to run) are indicated by single quotes. To make things more readable we've removed the single quotes. Comments are distinguished by a purple color. Note also that you can not have blank lines in a macro. We've included blank lines below for readability, but if you were creating your own macro, you would want to remove them. UPS Autofill macro (UPS-Autofill.iim)
This is a macro. Macros automate the process of filling in on-line forms. The nice thing about the macro technology, as compared to other autofill programs, is its flexibility. If desired, you have the ability to make your own macros -- or to tweak existing macros. You can automate browsing processes and even use it to extract data from websites. To help you understand how a macro is constructed, we've added a number of comments below.
Comments are indicated by a single quote mark ('). They are disregarded when the macro is played. All lines, however, without a quote mark, are considered commands and are executed when the macro is played. No blank lines are allowed. A blank line stops the macro at that point. In order to create and run the macros we have a licensed a technology called Internet Macros. It is a subsidiary program. The first line (below) in the macro tells the Internet Macro program which version created the macro.
VERSION BUILD=4160811
The following turns off encryption features which are not applicable in this use of Internet Macros
SET !ENCRYPTION NO
The following command turns off error checking. Error checking can be turned on when you want to debug a macro. (You can turn it on by placing a quote mark in front of the ERRORCONTINUE statement below.) But usually it's best to turn it off. When it's turned on, the macro stops. When it's turned off, it will skip the problem area and continue filling in the form. This means that if a small change is made in a website form, you'll be able to continue to fill out the form. It may miss that one field but the rest of the form will be filled.
SET !ERRORCONTINUE YES
This sets up a browser page to accept form input
TAB T=1 TAB CLOSEALLOTHERS
Sets the size of the browser window
SIZE X=876 Y=623
The following opens the export file (UPS.txt). The export file has been created by Advanced Export according to directions in a profile. (Profiles are created in FILE >> ADVANCED EXPORT.) The export file must be in a comma delimited format.
CMDLINE !DATASOURCE ups.txt
Once the file has been opened, the number of fields (columns) must be set. That's done in the next command. If you make your export file (by using Advanced Export), this corresponds to the number of export fields in your profile. It's important that the number of fields is accurate. If not, it will mix up the data coming into the form.
SET !DATASOURCE_COLUMNS 26
The following brings up a message (Prompt) asking you to enter a 1,2,3 etc. The 1,2,3 etc. correspond to the customers in the export file. If there is only one customer, then you would enter 1. If you want to process the 2nd customer, then you would enter 2 and so on.
PROMPT Which<SP>customer?<SP>(Enter<SP>1,<SP>then<SP>2,<SP>then<SP>3<SP>,<SP>etc.) !VAR1 1
!VAR1 in the next command is a variable. In this case, it's the number that the user has entered at the prompt. This number is used to select the customer from the data file (UPS.txt).
If !VAR1=1, the first customer (or the first row or record) in the data file is selected.
IF !VAR1=2, the second customer (or the second row or record) in the data file is selected.
When the SET !DATASOURCE_LINE command is all the fields of that particular record of UPS.txt are placed in {{!COL }} variables. The first field is placed in {{!COL1}}, the second field is placed in {{!COL2}}, etc. The {{!COL }} values will be used to fill in the blanks on the on-line form.
SET !DATASOURCE_LINE {{!VAR1}}
The following is a TAG command. TAG commands do much of the work in a Macro. More about TAG commands in a minute. What the following TAG command does is click a link. In this case it clicks the link which allows you to enter a new address in the Address Book. If you have a problem getting started, it may be because the New Address link is not on the page. Make sure you are on the right UPS page and that the New Address link is showing
TAG POS=1 TYPE=A ATTR=TXT:Enter<SP>New<SP>Address
The following creates a new tabbed page on Internet Macros Browser. The Address book doesn't actually have its own webpage location -- and Internet Macros compensates for this by creating a place for it.
TAB T=2
Now that all of the preliminaries are finished and we can fill in the web form The TAG commands below are what do the actual filling in of the form.
POS is almost always 1. TYPE can be INPUT:TEXT, INPUT:RADIO, INPUT:CHECKBOX, etc. That comes directly from the HTML source code and which creates that element of the on-line form. The NAME associated with TYPE is the name of the form.
ATTR is the name of that particular element of the form. Both the NAME associated with TYPE and the name associated with ATTR are found in the HTML source code for that element.
Finally CONTENT is the value you want inserted in that element in form. For example the following is the start of the return address blanks. The first element is the full name of the individual with a name of return_full_name.
The variable {{!COL1}} which holds the first field in the export file (UPS.txt) will be inserted in full_name blank. (When the the SET !DATASOURCE_LINE command was executed, above, all the fields of UPS.txt were placed in {{!COL }} variables. The first field of that row was placed in {{!COL1}}, the second field was placed in {{!COL2}}, etc. The {{!COL }} values will be used to fill in the blanks on the on-line form.)
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:mainPageForm ATTR=NAME:Company CONTENT={{!COL2}} TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:mainPageForm ATTR=NAME:ContactName CONTENT={{!COL1}}
{{Snip - At this point, a few command lines have been removed for readability}}
The following TYPE is a SELECT. That means it's a Selection Box. In this case it's a selection box will the names of states. You can select from a Selection Box by the position of an entry on the list, e.g. 50 for Wyoming, but that means you'd have to know the position numbers of all of the states. Instead it's more adaptable to use the state's name. But the states on the list are spelled out, and trying to use a state abbreviation won't find the right state. Thus, the profile which creates the export file has been set-up with a replacement table that replaces state abbreviations with the full name of the state. Note also the use of the string ($) which means look for the string. And also note the use of *. This means to ignore leading and trailing blanks that could be in the input data
TAG POS=1 TYPE=SELECT FORM=NAME:mainPageForm ATTR=NAME:State CONTENT=$*{{!COL6}}*
{{Snip - At this point, a few command lines have been removed for readability}}
The following TYPE is a CHECKBOX. This checkbox (Residential Address?) only accepts a YES when true. All else (e.g. NO) is disregarded & the checkbox remains unchecked. Thus, the field in UPS.txt must contain a YES if this checkbox is to be checked
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:mainPageForm ATTR=NAME:ResidentialAddress&&VALUE:Residential<SP>Address CONTENT={{!COL11}}
{{Snip - At this point, a few command lines have been removed for readability}}
This is the update button in the Address Book. The following command clicks the button which means that the new address has been entered in the Address Book and you'll be return to the original form.
TAG POS=1 TYPE=IMG ATTR=TXT:<IMG<SP>height=18<SP>alt=Update<SP>src="/img/en/btn_update_a.gif"<SP>width=64<SP>border=0<SP>name=btn6>
This brings us back to the original form that we started on back when we clicked on the New Address link
TAB T=1
Now we're ready to fill out the rest of the form. The following TAG commands do that . . .
TAG POS=1 TYPE=SELECT FORM=NAME:mainPageForm ATTR=NAME:selectedService CONTENT=$*{{!COL12}}* TAG POS=1 TYPE=SELECT FORM=NAME:mainPageForm ATTR=NAME:selectedPackaging CONTENT=$*{{!COL13}}* TAG POS=1 TYPE=SELECT FORM=NAME:mainPageForm ATTR=NAME:selectedNumberofPackages CONTENT=$*{{!COL15}}* TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:mainPageForm ATTR=NAME:package1Weight CONTENT={{!COL14}} TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:mainPageForm ATTR=NAME:package1DeclaredValue CONTENT={{!COL16}}
{{The macro continues filling out several more fields and then stops}}
Saving and Backing-up Macros If you develop your own macros or tweak the existing macros, you'll want to save them to two locations: 1. C:\AnyOrder\Internet\Macros. (This is where the Internet Macro browser expects to find the Macros. Any new macros or modifications of macros must be copied to this directory) 2. AnyOrder Back-up Disk Macros are not backed-up to your back-up disk. If you make changes or add macros, be sure to copy them to your back-up disk. We can't re-emphasis how important this is. If you need to re-install the program, you will lose your macros if you don't back them up. Macros & Re-installing There are two types of re-installs. One is re-installing the entire AnyOrder program. The other is re-installing Internet Macros. AnyOrder Re-install. When you re-install AnyOrder, all macros will be replaced with the macros that come with the program. Thus, as described above, if you create your own macros or if you edit existing macros, you'll want to make sure they are saved to the back-up disk. When the re-install is finished, you'll need to manually copy your own macros from the back-up disk to the C:\AnyOrder\Internet\Macros directory. Internet Macros Re-install. When you re-install Internet Macros, AnyOrder will temporarily move all macros from the C:\AnyOrder\Internet\Macros directory to the C:\AnyOrder\WebInfo directory. When the installation is completed, the files are copied back to C:\AnyOrder\Internet\Macros. Even though this mini back-up process is built into the program, we still highly recommend that you back up your own macros for safe keeping. Deleting Macros If you are not using certain macros you can delete them. To delete a macro, start up the Internet Macros browser by clicking on the "Internal Browser" button. From the list on the left side of the browser, select the macro that you want to delete. Click on the "Edit" tab. Then click on the "Delete Macro" button. The macro will be deleted. If a blank space is left, click on the "Refresh Macro List" button. Deleted macros can be restored by manually copying them. How you restore a macro depends on whether it's a macro which comes with the program or it's a macro that you've developed. If the Macro Comes with the Program. Use Windows Explore (reached by right clicking on the START button and selecting from the list). Find the C:\AnyOrder\WebInfo directory. Look in the directory for the macro you want to restore (i.e. UPS-Just_Login.iim). Highlight it, copy it and then paste it to the C:\AnyOrder\Internet\Macros directory. This is the directory that Internet Macros uses for its macros. The next time you start Internet Macros, you'll find the copied macro on the list. If the Macro was Developed by You. If you've backed up your macro, then it's just a matter of copying the macro (i.e. My_Macro.iim) from the back-up disk to the C:\AnyOrder\Internet\Macros directory. This is the directory that Internet Macros uses for its macros. The next time you start Internet Macros, you'll find the copied macro on the list. Back-up Your Work Whether you work on the single user system or a network system, you'll want to backup your work. Why is this necessary? If you do a re-install of the program, you will lose your work if you don't back it up. There's an easy way of backing up your macros and any setting local to your computer. To do this select FILE >> LOCAL BACK-UP & RESTORE. Click on the "Local Back-up" button. On the next dialog box that appears, place a checkmark beside: "Include Internet Macros in the Back-up." Then indicate the directory where you want the back-up placed and click OK. We recommend that you do the back-up twice in case your system might be a bit slow in creating the necessary sub-directories. After doing a re-install, select FILE >> LOCAL BACK-UP & RESTORE and click on the "Local Restore" button and restore your local files. Network Users Changes to macros are not available to all computers on the network. They are only available on the computer on which they were modified. For this reason, we recommend that you designate one computer on your network for on-line processing. If you alter a macro--or create your own macro--and if you want to use it on other computers on the network, you'll need to copy the macro to the other computers. Copy the macro to the following directory: C:\AnyOrder\Internet\Macros. Just a final reminder: if you alter or create your own macros, make sure you have a back-up for safe keeping. If you do a re-install of the program, you will lose your work, but if you have a back-up copy you can use FILE >> LOCAL BACK-UP & RESTORE to restore your macros. Error Checking in Macros When working with Macros, you'll want to turn the error checking on. That allows you to pinpoint where errors are occurring. For more information: Macro Error Checking.
Other On-line Shipment Processing Links: On-line Shipment Process - General Information WebLinks (WebLinks Properties Dialog Box) Trouble Shooting On-line Shipment Problems Macros (How to Turn On Error Checking)
|