Sunday, April 8, 2012

A simple form filler/importer for Tax time

If you have some data in a spreadsheet that needs to be entered in to a tax form or software and the software doesn't provide a method to import the data, you can use this simple AutoHotKey script:

Loop, read, c:\expenses.csv
    LineNumber = %A_Index%
    Loop, parse, A_LoopReadLine, CSV
    SendInput, %A_LoopField%
    Sleep, 250
    Sleep, 250
  1. Download and install AutoHotKey if you don't already have it
  2. Copy and save the above script as a text file using Notepad or any other text editor - call it "fill.ahk"
  3. Make a copy of your spreadsheet and remove all the columns that don't need to be entered
  4. Remove blank rows and any unneeded rows as well
  5. In the script, change the file path "c:\expenses.csv" in line 2, to a different path if necessary
  6. Once, the file is ready and in place, double-click the "fill.ahk" file - it shouldn't do anything yet, but you should see a green "H" tray icon
  7. Switch to your program and page that needs the data entered - I've used for the miscellaneous business expenses entry in TurboTax, but it should work with any program that allows to you move from one field to the next using the "Tab" key
  8. Press Ctrl and F12 simultaneously - You can change the hotkey in the first line of the script if you like. It should start filling your form
  9. If you see any erratic behaviour - your program cannot keep up with the speed of data entry, increase the sleep day from 250 to 500 or higher and restart "fill.ahk"

No comments:

Post a Comment