Here's a script that brings up the New Zealand zip code and map for a provider ( Firefox icon on the providers page ) on new tabs.
try { number = find(/Number: ([\w\s]+)/).groups[1]; }
catch(e) {
number = '';
}
try { street = find(/Street: (.*)/).groups[1]; }
catch(e) {
street = '';
}
try { suburb = find(/Suburb: (.*)/).groups[1]; }
catch(e) {
suburb = '';
}
try { city = find(/City: (.*)/).groups[1]; }
catch(e) {
city = '';
}
try { street2 = find(/Number&Street: (.*)/).groups[1]; }
catch(e) {
street2 = ''; // this is two single quotes
}
try { city2 = find(/City&State: (.*)/).groups[1]; }
catch(e) {
city2 = '';
}
with(openTab('http://www.nzpost.co.nz/Cultures/en-NZ/OnlineTools/PostCodeFinder/', true)) {
enter("Number",number)
enter("Street Name",street)
enter("Suburb",suburb)
enter("City",city)
click("SubmitAddressSearchImageButton")
}
with(openTab('http://www.wises.co.nz/Default.aspx/', true)) {
enter("Street",street2);
enter("Auckland",city2);
click("Search");
}
Graham Chiu
Beta Downloads and Documentation Wiki
Developer Forum