Everyone knows, course registration is the suckiest part of the semester. Apart from the fucked up ISAS portal, its because of the following steps that each one of us needs to perform -
1) Fill up the form in a damn hurry.
2) Check if all the courses are entered properly.
3) Click the ‘Update’ button.
4) Hope that you are in.
Now, step 2 is a very big problem. If you do it, you are late, and if you don’t, you may be dead before you know it. So, I decided to let my computer take control of step 1. Hence, started searching if there is anything that can automatically type letters, and found a Java class called ‘Robot’. Without wasting any time, wrote a simple program that can fill my form just as I would possibly have done. Here it goes, entering my courses…
—Start Program—
import java.awt.Robot;
class CourseRegistration {
private static Robot robot;
public static void Type(int key) {
robot.keyPress(key);
robot.keyRelease(key);
}
public static void FillForm(){
int i;
// Select the first field by pressing a 'TAB'
Type(9);
// Register for Major Project II by pressing 'M' 3 times
for (i=0;i<3;i++) Type('M');
// Select the next field by pressing 'TAB' 3 times
for (i=0;i<3;i++) Type(9);
// Register for Project (4 C 7th sem) by Pressing 'P' 18 times
for (i=0;i<18;i++)Type('P');
// Select the next field by pressing 'TAB' 3 times
for (i=0;i<3;i++) Type(9);
// Register for Linear Programming by pressing 'L' 5 times
for (i=0;i<5;i++) Type('L');
// Select the next field by pressing 'TAB' 3 times
for (i=0;i<3;i++) Type(9);
// Register for English Literature by pressing 'E' 8 times
for (i=0;i<8;i++) Type('E');
// Finally, just to be safe, press a 'TAB'
Type(9);
// Done!
}
public static void main(String[] args) {
try {
Thread.sleep(1000);
robot = new Robot();
FillForm();
} catch (Exception e) {
}
}
}
—End Program—
Steps (although quite obvious) one need to follow after making suitable changes are -
1) Open the special registration page.
2) Make the fields ‘—None—’ and set the mark above the actual form.
3) Compile the program.
4) Run it and alt-tab the special registration page within 1 sec.
5) Update and be happy.
PS0) May be some of us already knew about it. Anyways its interesting.
PS1) Found “Motto : ?” written on our colleges’ wiki page. No offence but that seems true.
PS2) Happy next sem to all of you.
samwise


