Showing posts with label Computer. Show all posts
Showing posts with label Computer. Show all posts

Monday, 15 July 2013

How to type on Computer without physically typing?

We have many programming languages, but I prefer Java to any other. It's because of its huge libraries. Thanks to James Gosling.Oh..,I revealed..!!!Yea..it's through Java.. 



Know How...!!!
1. Open your Java IDE or cmd or whatever you are using to execute Java programs.
2. Copy the following code and paste it in your IDE. Make sure class name and program name matches.

import java.awt.*;
import java.awt.event.*;
import java.io.IOException;

class Notepad {

public static void main(String args[]) throws IOException, InterruptedException, AWTException{
Runtime.getRuntime().exec("notepad.exe");
Thread.sleep(2000);
Robot r=new Robot();
r.keyPress(KeyEvent.VK_T);
Thread.sleep(500);
r.keyPress(KeyEvent.VK_H);
Thread.sleep(500);
r.keyPress(KeyEvent.VK_I);
Thread.sleep(500);
r.keyPress(KeyEvent.VK_S);
Thread.sleep(500);
r.keyPress(KeyEvent.VK_SPACE);
Thread.sleep(500);
r.keyPress(KeyEvent.VK_I);
Thread.sleep(500);
r.keyPress(KeyEvent.VK_S);
Thread.sleep(500);
r.keyPress(KeyEvent.VK_SPACE);
Thread.sleep(500);
r.keyPress(KeyEvent.VK_F);
Thread.sleep(500);
r.keyPress(KeyEvent.VK_U);
Thread.sleep(500);
r.keyPress(KeyEvent.VK_N);
}
}

3. Run the program to view the result.

Okay...!You did this..But, why did this happen?Why did notepad open automatically and something is typed without, you physically typing?
The Runtime.getRuntime.exec() gives the power to Java to execute notepad directly. A starting delay of 2000 millisecs is introduced so that Notepad gets a chance to open and our program writes in Notepad and not anywhere else. After each letter, i introduced a delay of 500 millisecs so that it looks like someone is typing.

That's funny part of Java...!!! :) Let's learn many such techniques in upcoming articles... 

Wednesday, 10 July 2013

How to add a shutdown title to Start Menu?

Shutting down the PC in Windows is not really a straightforward matter. You have to move your mouse over to the lower-left corner and open up the Start Menu before you can select the “Shut Down” option. Using the trick stated here, you can easily pin a “Shut Down” tile to the Start screen where you can select to shut down the PC immediately.

Know How...!!!
Here are the steps to create shortcut for shut down process:
1. Go to Desktop, right click on the mouse and select New--> Shortcut.



2. Now, it asks for the location to link with shortcut. Type "shortcut /p" and click on "next", followed by "Finish".


3. Now, right click on the shortcut and select "Pin to Start Menu" or "Pin to Task bar".

Simple trick, but saves a lot of time..!!Try it now

Note: Why did shutdown happen when "/p" is added to shut down? It is a command prompt command to shutdown the computer. Here is more info:
Syntax
      SHUTDOWN [logoff_option]  [/m \\Computer] [options]

logoff_options:
    /i         Display the GUI (must be the first option)
    /l         Log off. This cannot be used with /m or /d option
    /s         Shutdown
    /r         Shutdown and Restart
    /a         Abort a system shutdown.
               (only during the time-out period)
    /p         Turn off the local computer with no time-out or warning
               (only with /d)
    /h         Hibernate the local computer (only with /f )
    /e         Document the reason for an unexpected shutdown of a computer

Tip: Each time Windows is shut down or restarted manually, including via the shutdown command, the reason, type of shut down, and [when specified] comment are recorded in the System log in Event Viewer. Filter by the USER32 source to find the entries.

Friday, 5 July 2013

How to run Android Apps on your Desktop?

What are the features available on android, but absent on Windows or Mac?The first and obvious answer everyone give is: There are many more apps available for the Android operating system than there are for Windows Phone. 
Why would anyone want to run android apps on windows or Mac? Well, suppose you have an app that you really like and there’s no proper desktop equivalent. You can run it on your main computer instead of on your tiny little Android phone. Or, perhaps you’re thinking about buying a tablet, but you’re not sure what apps you’d like.  You can try out many of the free apps. You can play around with those apps on your desktop or laptop and see if you like them before you buy something you may or may not use. It’s pretty great for developers who want to demo their app, but for some reason don’t have access to a PC with the SDK.

Know How...!!!
BlueStacks is essentially a self-contained virtual machine (i.e. you can call it emulator) that runs Android apps on your Windows computer.The biggest appeal is that you don’t have to deal with the Android SDK – or even know what that is, really – and so it’s great for beginners. You can easily install apps available from BlueStacks’s list of free apps, and if you have an Android device, you can install many apps from your device via the Cloud Connect app.


1. Installing BlueStacks:
Installing BlueStacks is quite easy. It is currently available for Windows XP, Vista, 7 as well as Mac OS. Grab it from: http://www.bluestacks.com/ 
After the program is installed, the installer will ask if you would like to view an introductory video. It’s very short and gives you the basics of how the program works.
BlueStacks installs a desktop gadget that acts as a launcher.

2. Go research the software to learn how it works:
You can move this around and change the opacity like normal gadgets. To open up the launcher, just give this icon a left-click.
You’ll see the list of default installed apps. Click any one to launch it.


You’ll see the app come up like it would on an Android device. Just use the mouse like you would your finger, and if you happen to have a touch-screen, then you’re probably ecstatic.
3. How to add more new apps:
From the BlueStacks Launcher, you can click the Get More Apps link, which will open a browser window pointed to the BlueStacks Channels website.
Login using Google or Facebook accounts and you will see the below page:

Here, you’ll see a 9-digit PIN for use with the Android Cloud Connect app. You can click on the Featured Apps link on the left to browse and subscribe to the free apps available from BlueStacks. Install the app and on your computer, you’ll see a popup in your system tray when the apps have successfully installed.

How to uninstall the apps?
When you go back to the BlueStacks Channels website, you can click on the Cloud Connect link on the left to see which apps you have installed this way. To uninstall an app, just click the Subscribed button. After a little while, the app will be uninstalled from BlueStacks and you’ll see a blue Subscribe button, in case you want to reinstall it.

On the whole, BlueStacks seems like a very easy way to get Android apps working on your desktop, laptop, or even Windows tablet.Use all android apps from WhatsApp to TrueCaller from your PC itself... Thanks to BlueStacks...!!!

Thursday, 4 July 2013

How to make your computer welcome you?

Do you watch Hollywood movies? Have you always loved the way how Computers in movies welcome their users by calling out their names? Bored of listening to people saying, we are becoming slaves of gadgets right? You can make your Windows based computer say "Welcome dear master". 


Know How...!!!
To make Windows Greet you with a Custom Voice Message at Startup, here are the instructions below:
1. Click on start, select run and go for notepad.
2. Copy the following code and paste in the notepad:


Dim speaks, speech
speaks="Welcome to dear master"
Set speech=CreateObject("sapi.spvoice")
speech.Speak speaks


If you want to listen to your name, type your name along with the message.

3. Now, save the file with ".vbs" extension.
4. To test whether it's working double click on it. You can listen to the software speaking the message.
5. Copy the saved file and navigate to C:\Documents and Settings\All Users\Start Menu\Programs\Startup (if your Operating system is Windows XP) and to C:\Users\ {User-Name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup (if Windows 8, Windows 7 and Windows Vista) if C: is your System drive. 

Note: AppData is a hidden folder. So, you will need to select showing hidden folders in Folder options to locate it.
6. Paste the file and restart your system.

And Hurray..!!!your computer speaks..."Welcome dear master" Isn't it cool?? Try it now!

Tuesday, 25 June 2013

How to shutdown Your Computer giving a funny reason?

Not just you..Your computer gets tired too...! What if your computer can say "I am tired. Please don't tap! tap!!tap!!! me idiot. I am getting irritated"? ROFL...Do you want to try this with your friends' PC or laptop?

Know How...!!!
Type shutdown -s  -t 500 -c "I am tired. I don't want to work anymore idiot." (with the quotes) in the Command Prompt and press Enter. The -c switch is used in the code to give the reason for shutting down and what is followed in quotes will be displayed in the dialog box as the reason. This can be used to display all sorts of funny messages. For example: "Can't you do anything right? I can work for myself.You cannot use your PC anymore." Your friend restarts the system, but it shuts down again and again and again... :)

Now how to stop the shut down?
Type "shutdown -a" and press Enter. This will stop the system from shutting down if the countdown to shut down has not reached 0.

Tease your friends now...!!! :)