Code: try { surname = find(/Surname: (.*)/).groups[1]; } catch(e) { surname = ''; // this is two single quotes } try { fname = find(/Salutation: (.*)/).groups[1]; } catch(e) { fname= ''; // this is two single quotes } try { state = find(/State: (.*)/).groups[1]; } catch(e) { state = ''; // this is two single quotes } with(openTab('http://www.npinumberlookup.org/', true)) { enter("Last Name or Entity",surname); enter("First Name", fname); pick("State", state); click("Search for NPI button"); } This is a chickenfoot trigger for the http://localhost:8002/searchprovider.html page that comes up when you click on the FF icon on the provider page. You need to be using beta 29 or later. To install chickenfoot into Firefox, see http://groups.csail.mit.edu/uid/chickenfoot/
I am blocked from accessing https://nppes.cms.hhs.gov/NPPES/NPIRegistryHome.do but for those of you who can, it should be easy to update my script to work with that page instead.