Archive for August, 2008
Robo007 at your Rescue – tech
Harly is back with a bang,
This time with something that you really need in certain situations.
Do ur screensaver annoy you, showing it after say x minutes of ur system being idle?
Do ur system ‘automatically locks’ after x minutes? As a result u r not able to download continuously!
Do ur bigB finds you are away , seeing ur monitor idle?
A quick easy solution, offcourse it seems you have already installed jdk on ur system..
Just run this piece of code,
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.InputEvent;
import java.io.IOException;
public class Robo007 {
public static void main(String[] args) throws AWTException,IOException {
Robot rob = new Robot();
int count=0; int minutes=40; // works for 40 minutes. Change here as ur need
while(count < minutes) {
rob.mouseMove(1000,100); // arbitrary location
rob.delay(2000);
rob.mousePress(InputEvent.BUTTON1_MASK); //left click
rob.mouseRelease(InputEvent.BUTTON1_MASK);
rob.mouseMove(1100,250);
rob.mousePress(InputEvent.BUTTON1_MASK);
rob.mouseRelease(InputEvent.BUTTON1_MASK);
rob.delay(60000); // 1 minute delay
count++;
}
}
}
Run this code, and you are done with ur problem.
For Newbies:
Save the code in a file named Robo007.java. Save it in say D drive, inside a folder ‘max’
Open command prompt, set path=”the complete jdk path” ..say ‘set path=” D:\trojans\jdk1.5.0_06” ’
Then go the drive where the javafile is located using the command ,
D: [pls type this]
D:/ cd max [pls type this]
D:/max/>
Now, compile the javafile:
D:/max/ > javac Robo007.java [or use, javac –d <destination dir> <source dir> ]
You get the classfile Robo007.class in D:/max
Now Run the Class file using the command,
D:/max/ > java Robo007 [or java –cp . Roo007 ][Pls note space before & b/w -cp and dot]
That’s it, its launched J cheers J
Kudos to SunMicrosystems .
2 comments August 26, 2008
Are you in Panic ?
We often make serious mistakes by giving undue importance to people who can least affect our life and in most cases u will give undue worth for meeting with such persons.
Result : you will be in a state of panic. Now the adrenalin will be pumping heavily and your blood will be rushed from brain to other parts of body. The beauty with the state of panic is that, once u enter this state, it will increase steadily making it very difficult to come out of it.
I am referring to my situation, the same time last year. one fine day, i reached office, was in a very good mood, hearing music from my ipod, read all my mails and was about to start the work. then it happened. my manager gave a call and asked me to meet him. It was sooo unexpected. I started to panic. With myself heavily immersed in panic state, i entered his room. By the time i saw him, i was almost in an unconsious state.
After that, whenever i think of that incident, i dont know, what made me give undue importance to him and that meeting. Then one fine day, i got the answer. Panic happens only when you are going to encounter something, which is unexpected. And in my opinion, it can happen only when u have given undue importance to something, which is not worth.
Life has change a lot after this. Now i have to meet my manager, i am taking a breath, make sure that the meeting is not being given undue importance and taking another deep breathe, and now i am entering his cabin consiously.
see u guys soon.
Add comment August 8, 2008
Two Choices… Which one to take ?
I am in that point in my life, where i am finding two choices in front of me and without knowing which one to take. The fact is till now, i didnt thought too much about my life. but now, i started …
In one side my parents are trying hard to convince me to get married. in the other side, i am hearing my mind saying, its time for my startup.but again here my worst enemy is fears and inhibitions (as usual). what if i fail… .
y’day, i saw this movie “The matrix”. Here, at one point, the main character is being given the choice of taking either the blue pill or the red pill. if he takes blue pill, he can remain ignorant of the fact that he is living in a world of illusion and will allow him to live as he is . the red pill will give him the freedom to view things as they really are.
Now i am imagining myself in that situation. what to do ? How can i take a path, that i dont know, to achieve something,which i never know ?
My decision : Red and the Blue pills are still in my hands. I have decided to hold on till my brain gets settled .
“To every man there comes in his lifetime that special moment when he is figuratively tapped on the shoulder and offered a chance to do a very special thing, unique to him and fitted to his talents. What a tragedy if that moment finds him unprepared or unqualified for the work which would be his finest hour.”
Winston Churchill
Add comment August 8, 2008