You are on page 1of 17

Guide for Using iMacros to Pull Real Estate Records

By Rick Dawson www.taxsale.net www.deedgrabber.com

Setup (one time only):


1. Install iMacros and enter your Scripting license key (Help->Enter License Key)
2. Open iMacros. There are three file locations you need know about:

Datasources: We will typically be looking up properties by parcel number. This


folder is where you will keep the lists of parcel numbers you want to look up.
Downloads: This is where iMacros will save your results that it retrieved from the
web.
Macros: This is where the macros you record will be stored. A macro is just a set of
instructions for each website, telling iMacros what to retrieve. More on this later.

I suggest setting the location of these three folders to somewhere convenient on your
computer. You will need to access all three regularly.
I like to put each folder on my desktop for easy access. Heres how you do that:
In iMacros, go to Tools->Options->Paths tab. Heres what you should see:

Click the small file folder icon for each folder and navigate to your desktop. Then
choose Make new folder. For Folder Macros create IMMacros. For Folder
DataSources create IMDatasources. For Folder Downloads create IMDownloads.
Click OK.
Now you will know where to easily access these folders later, and youve programmed
iMacros with where to find them as well.

Setup (for each new county you want to run):


File Preparation:

Step 1: Copy the parcel numbers from your existing list into a new spreadsheet or type them in
manually into a new spreadsheet.
Open your list and copy only the column of parcel numbers, and paste it into a new spreadsheet.

Remove any column headings.


Save this spreadsheet as File Type=CSV and name the file something you can remember. I
usually name mine [County Name]parcels.

Save the file in the IMDatasources file you just created on your desktop.

Create the Macro:


Step 1: Locate the county website where you would like to pull data. For this example we will
use the Lake County, Indiana Assessors website to get property information.
This website is located at http://in-lake-assessor.governmaxa.com/propertymax/rover30.asp
Go to the website in a regular browser and see what is available on the site for a sample parcel
number on your list. Decide what data you would like to retrieve, and become familiar with how
to navigate in the site to view that data.
For our example, lets retrieve owner name and address, property type, assessed value, lot square
footage/acreage, and improvement square footage.
Step 2: Record a one-time only macro. The macro is what tells iMacros where to go and what
information youd like to gather.
Open iMacros and enter the county website in the address bar and navigate to where you would
normally go to manually enter your parcel number.
Next, click on the #Current.iim macro on the top left of the screen, click the Record tab, and click
the record button that appears.

Click the field where the parcel number is requested. Enter a sample parcel number from your
list manually and click the appropriate search button. If the input area for the parcel number
consists of several fields, be sure to click on each field before entering that part of the parcel
number.

Then navigate to the page that contains the information youre looking for. Some of the
information youre looking for may be available right on the first page. In that case stay on that
page for now.
Click the Extraction Wizard button when youre on the first page containing data you want.
The following box will appear:

You are now ready to retrieve data from this page. I suggest retrieving the property parcel
number first. This will give you a reference for the data you are about to pull, so you can be sure
youre matching the right data with the right parcel number later.
For each piece of data you want for the parcel thats on this screen, click on that data with the
mouse. Next, in the box labeled ATTR:, change the specific data found there to *. Click the
Find POS button.

Finally click Test EXTRACT tag, and a popup will tell you what you should expect to extract
with that command.

Repeat for each additional field you want to pull. When youve pulled all the data for the page
you want, click Close.
You can again navigate in the website at this point if there is more data you want on other
pages, navigate to those pages and repeat the above process to get more data on each page.
When youve used the extraction wizard to extract all the data you want to get, close the Wizard
and navigate back to the beginning again. Usually you can do this by clicking a New Search,
New Parcel link, or something similar. Click Stop on the Recording tab.
Youre now done recording the macro.
Step 3: Pre-edit the macro
Click on #Current in the macro list like you did last time, and click the edit tab and Edit
Macro button. The macro will pop up in Notepad.

Remove any lines that start with the URL GOTO= Click File->Save in Notepad.
Step 4: Test-play the macro
Click #Current for the macro, then the Play tab and Play button.

You should observe your sample parcel number being typed in, then a popup will show you the
data that iMacros is extracting. The navigation should return to where it started.

Youre now ready to automate the macro to accept an unlimited number of parcel numbers.
Step 5: Modify the macro to accept your file of parcel numbers
Again click the Edit tab and Edit Macro button so your macro appears in Notepad.

Go to the end of the first line (begins with VERSION BUILD=) and hit enter to create a blank
line.
Paste in the following code:
SET !EXTRACT_TEST_POPUP NO
SET !DATASOURCE filename.csv
SET !DATASOURCE_LINE {{!LOOP}}

Replace filename with the name of the parcel number-only file you created at the beginning.
Step 6: Further modify the macro to insert parcel number and save results.
At this point your macro should look something like this:

Its not really necessary to understand this code completely. We just want to recognize the major
sections of it.

If the parcel number is entered all at once, in one field


(skip this section if parcel number is broken up into several fields)

Here we want to find the section of the macro where the parcel number is entered. We will just
look for the sample parcel number we typed in while recording the macro.
Now we need to replace that number with the following:
{{!COL1}}
This tells the macro which column the parcel number is found in, in the datasource spreadsheet
we created.
VERSION BUILD=7050969
SET !EXTRACT_TEST_POPUP NO
SET !DATASOURCE lakeparcels.csv
SET !DATASOURCE_LINE {{!LOOP}}
TAB T=1
TAB CLOSEALLOTHERS
FRAME NAME=body
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:searchform ATTR=NAME:p.parcelid CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:searchform ATTR=NAME:go&&VALUE:Go
TAG POS=43 TYPE=FONT ATTR=TXT:* EXTRACT=TXT
TAG POS=44 TYPE=FONT ATTR=TXT:* EXTRACT=TXT
TAG POS=52 TYPE=FONT ATTR=TXT:* EXTRACT=TXT
FRAME NAME=body
TAG POS=1 TYPE=A ATTR=TXT:Parcel<SP>Number

If the parcel number is entered in several pieces:


Sometimes a county requires that a parcel number like 109-43-443 to be entered like this:

As instructed earlier, when you record the macro, be sure to click on each field separately even if
the cursor automatically jumps to the next field. The macro file will look a little different:

Macro with single parcel number field:


TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:searchform ATTR=NAME:p.parcelid CONTENT={{!COL1}}

Macro with several parcel number fields broken up:

We will need to break up those parcel numbers in our Datasource spreadsheet, and enter each
segment of the parcel number separately.
First, replace each segment of the sample parcel number entered with {{!COL1}}, {{!COL2}},
{{!COL3}}, etc:
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:bookf CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:mapf CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:itemf CONTENT={{!COL3}}
Then youll need to modify your parcel number file so it has the appropriate number of columns.
Say this is our Datasources spreadsheet:

We see that we need to enter 3 numbers of the parcel number in the first field, 2 in the second,
and 3 in the third. Highlight the column and choose Data->Text to Columns. If youre using an
older version of Excel this feature IS available but may be accessed slightly differently.

In this case, well choose Fixed Width because we know we want 3 digits, 2 digits, then 3
digits.

Well just click where we want to divide the number as shown, and click next and Finish.
If there had been any zeros in the parcel numbers, we would have needed to take another step.
Excel will cut off any leading zeros, and we want to restore those. See this example:

For row one we would have wanted 108, 09, 566. There are also other columns with the leading
zero cut off.
Highlight each column, right click, choose Format Cells, Custom.

In the Type: box, type in zeros until the column reaches the proper width. In other words, if
there are supposed to be 2 digits for the column, type 00. If there are supposed to be 3, type
000, and so on.

Repeat this for each column. Now the sheet is how we want it:

Resave the datasource file, make sure its CSV format, and in the proper location as discussed
previously.
Either Parcel Number Format Resume Here
The last thing we need to do is add a command to save the data we collect into a file. That
command is:
SAVEAS TYPE=EXTRACT FOLDER=* FILE=countynameresults.csv
This will save your results file in the Downloads folder you created at the beginning. Replace
countyname with the name of the county youre searching.
VERSION BUILD=7050969
SET !EXTRACT_TEST_POPUP NO
SET !DATASOURCE lakeparcels.csv
SET !DATASOURCE_LINE {{!LOOP}}
TAB T=1
TAB CLOSEALLOTHERS
FRAME NAME=body
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:searchform ATTR=NAME:p.parcelid CONTENT={{!COL1}}

TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:searchform ATTR=NAME:go&&VALUE:Go


TAG POS=43 TYPE=FONT ATTR=TXT:* EXTRACT=TXT
TAG POS=44 TYPE=FONT ATTR=TXT:* EXTRACT=TXT
TAG POS=52 TYPE=FONT ATTR=TXT:* EXTRACT=TXT
FRAME NAME=body
TAG POS=1 TYPE=A ATTR=TXT:Parcel<SP>Number
SAVEAS TYPE=EXTRACT FOLDER=* FILE=lakeresults.csv

NOTE: Delete or rename the countynameresults.csv file in the Downloads folder anytime you
run the macro again, including if you have to correct something with it. Otherwise iMacros will
continue to write in the file and it can get confusing. Also, never have the countynameresults.csv
file open in Excel when you run the macro, or it will not be able to write to the file.
Save your macro and give it name.
Filename: countynamemacro.iim
File Type: Any

Just about done!


Step 7: Run the macro and get results
Its time to gather the data.
Refresh the macro list so your macro now appears:

Select your macro and go to the play tab:

Manually navigate the browser to where you need to start your search, and enter the number of
records in your parcel number files (the number of times iMacros needs to loop through).

Click Play(Loop)

Step 8: Retrieve your results file


Once iMacros has completed running, open the file countynameresults.csv in your
IMDownloads folder your created earlier.
If you followed my suggestion, the first column will contain the parcel number followed by the
additional information you wanted:

Copy and paste this information right next to your original list and make sure the parcel numbers
match up.
Now you can filter your list!
Make sure to rename your results file (perhaps add a date to it?) and delete the old results file so
next time you run the macro there is a blank file to start with again.