# Automated form 40As

Recently, I had to produce form 40A's in order to claim military leave. As a computer scientist, I found the process to be horrific and felt compelled to share my solution. I didn't get much help with UTAPSWEB FOR IMAs CHEAT SHEET VERSION 101210. That document is filled with unhelpful and unprofessional statements like:

Changes made to Form 40As because you were just ‘trying something’ may not be able to be resolved.

Oh, well, I Am Alone once again. I'm a hacker, famous for 'trying something', well here goes . . .

Should you ever find yourself in this situation, navigate to "Automated Form 40s":

From here, I had to look at the source code to decode the buttons. The icons kinda make sense, but they are about 10px high and don't even have mouseover text. Ok, the source can't lie:

Based on this, I clearly wanted the

MainContent_imgPrintMassSelect

. After clicking this and waiting for the long update to happen. You can select multiple 40As:

So from here, the

imgPrintSelected

button looked like the next logical step. Make sure to allow popups (nice 1990s web-practices!). The result was an unexpected:

So that doesn't work. Let's look at the traffic and dive into the form. First, there is no form. They are counting on a click event with js in the div header.

So the important code is clearly in there, there are single click events, double-clicks and even an attempted contextmenu override.

onclick="javascript:igtree_nodeclick(event,'ctl00MainContentUltraWebTree1');" ondblclick="javascript:igtree_dblclick(event,'ctl00MainContentUltraWebTree1');" oncontextmenu="javascript:igtree_contextmenu(event,'ctl00MainContentUltraWebTree1');" onselectstart="javascript:igtree_selectStart();"


At this point, I'm getting in too deep and just need to get 16 IDTs printed. Clicking on one at a time will take 20 minutes, so I wrote an adobe script to automatically change the dates. Did anyone else have better luck on this? I'm considering writing a new front end to all of this that scrapes the back-end. Any other developers want to help me with that?

## One Reply to “Automated form 40As”

1. Alicia says:

I’m glad to know you have just as much trouble as I do! I’ve been an IMA for almost 3 years and have never been able to mass print, nor combine successfully. While the IR guide distributed by RIO is a great resource, it doesn’t cover half of the questions or material needed to accomplish basic day to day IMA tasks.

This site uses Akismet to reduce spam. Learn how your comment data is processed.