Friday, July 30, 2010

Turn Any Action into a Keyboard Shortcut

Friendly Computers thought that this article can help you to increase your productivity by using keyboard shortcuts for any action.

Open source scripting language AutoHotkey may not be one of the most powerful or popular programming languages on the planet, but that's okay—it's not just made for programmers. That's because AutoHotkey is well within the grasp of regular folks like you or me—people who have a fair understanding of computers and are willing to learn just a little to make major strides in productivity. Today I'll show you how to use AutoHotkey to turn almost any action into a keyboard shortcut.

NOTE: I'm not a computer programmer by trade. In fact, I graduated from college a few years ago with a degree in Philosophy of Religion, Arts, and Science (a liberal arts degree I made up). My point is, even if you have absolutely no programming experience, creating simple keyboard shortcuts with AutoHotkey is well within your grasp.

Before You Get Started

First things first: You're an amateur programmer now, so you need to go download and install AutoHotkey. Once you've got that done, open a folder, right-click, and select New -> AutoHotkey Script. Give it whatever name you like, then open it up with your favorite text editor (I recommend Notepad++).

You can also grab a script of all the examples I discuss below here if you'd like to use it as a starting point.

What is a Hotkey?

In AutoHotkey, you can create keyboard shortcuts or remap keys easily in more than one way, but today we're going to focus on one method: Hotkey labels. The syntax of creating a hotkey is very simple, and can be used in two ways.

First, if you want to do something very simple—like remap a key—it looks like this:

hotkey::remapped key

...where hotkey is the keyboard shortcut that will activate the second part—in this case, a remapped key. That may seem rather vague, so let's look at a concrete example. I don't like the Capslock key as is, preferring instead to remap it to my Control key. With AutoHotkey, all it takes is:

Capslock::Control

If you add that small snippet of code to the AHK file you created above and then run the file (just double-click it), you'll notice that your Capslock key now works as a control key instead. Now not only have you got your control key at a much closer, less stressful range for your pinky, but you're not likely to accidentally fire the Capslock key when you don't want it. However, if you don't want to lose the Capslock key altogether—as there are times it can come in handy—you can add the following to your AutoHotkey script (Thanks mc_spanky_mcgee):

+Capslock::Capslock

With this hotkey, the plus sign (+) stands for Shift, so hitting Shift+Capslock will turn on and off the Capslock key so that turning on Capslock requires a much more deliberate process. For a full list of modifiers you can use to create hotkeys, check out this page. For a better idea of which symbols you can use, from Capslock to Tab to the Spacebar, check out the full AutoHotkey key list.

So far so good, right? You can actually remap almost any key in this way—including regular, non-modifier keys. So if you wanted to turn your "k" key into an "i", it'd be as simple as:

k::i

Not that remapping k to i would be terribly useful, but you get the idea. It is terribly simple.

Taking Hotkeys a Step Further

Now that you've got an idea of how to create hotkeys the simple way, we'll move on to slightly more advanced hotkey creation. First, we'll create a simple hotkey that will open Lifehacker when we press Windows-l (who wouldn't rather read Lifehacker than lock their desktop?). Quite simply, it looks like this:

#l::Run, http://lifehacker.com/

In this example, we're using the Run command, which can take any target—from web URLs to files on your hard drive—and, quite simply, open them.

As a result, creating a keyboard shortcut to launch anything at all is a breeze. You can launch any program, document, or web page with a simple shortcut of your choosing. If you were creating an iTunes shortcut with Windows-i (where the Windows key equals the pound sign [#]), for example, it might look something like this:

#i::Run,%A_ProgramFiles%\iTunes\iTunes.exe

You'll noticed I introduced another concept here: variables. The variable %A_ProgramFiles%tells AutoHotkey to look in my default Program Files directory—in my case, "C:\Program Files". I could have just made the command Run, C:\Program Files\iTunes\iTunes.exe, but using the variable means that—assuming I've got iTunes installed—the same shortcut will work on other computers that have iTunes installed to the default directory, even if their home drive is D:\ or F:\. For more on variables, check out AutoHotkey's introduction to variables, along with their list of built-in variables (like%A_ProgramFiles%).

Creating More Complex Hotkeys

So far our hotkeys have been very simple, one-line affairs, but sometimes you need more than that. In those instances, you can create multi-line actions that you want to occur when your hotkey is triggered. This requires a slightly different syntax.

hotkey::
Do one thing
Do more things...
return

Basically, as you can see, it starts out the same way with the hotkey followed by two colons. Then, however, you break to a new line and write your first action, followed by however many you want, and it ends with "return" (which signifies that the hotkey is done executing). So let's put it into practice.

The following keyboard shortcut, Windows-t, will automatically empty the Recycle Bin when I press it. When it's finished, it will show me a message telling me that the trash has been taken out.

#t::
FileRecycleEmpty, C:\
MsgBox, The trash has been taken out.
return

empty-trash.pngIn the hotkey created above, I used AutoHotkey's FileRecycleEmpty command, which takes the drive letter where the bin is located as a parameter. I also used another new concept: the MsgBox command, which displays the text after the command in a window. As you can see, I used it to confirm that the command was run and the trash was taken out.

Restrict Your Hotkey to a Specific Application

Sometimes you want to create a hotkey that will only be applicable to one specific application. In those cases, you need to use the #IfWinActive directive. To use it, you need to place #IfWinActive WindowType (where WindowType is the window or app you want the shortcut to apply to) followed by the hotkey, then followed again by #IfWinActivewithout any WindowType (so that all following hotkeys won't be restricted to one window or application). In the example below, I've set the Windows-o hotkey to open the Options in Firefox.

#IfWinActive ahk_class MozillaUIWindowClass
#o::
Send {Alt}t
Sleep 100
Send o
return
#IfWinActive

autoit3-window-spy.pngSo let's dive in and examine this bit of code. First, you'll notice theahk_class MozillaUIWindowClass bit. That may seem intimidating, but all it does is tell AutoHotkey that this shortcut will only work when a program using the MozillaUIWindowClass (like Firefox or Thunderbird) is active. You can grab the ahk_class using the AutoIt3 Window Spy, which you'll find in your AutoHotkey install directory. Just run it and click on the window you want to restrict a hotkey to grab the window class and that's a good starting point.

Next, we've used the Send command, which sends literal keystrokes to your window. The first one I sent was Send, {Alt}t, meaning that the bracketed text, Alt, indicates a modifier (again, go to the Send page for a closer look at modifiers)). If you were to press Alt-t in Firefox right now, you'll notice that the Tools menu drops down.

Then I sent the command Sleep 100, which tells the script to wait 100 milliseconds before going to the next command. I do this just to make sure the computer has time to react to my first command and the Tools menu is open. Then I sent the "o" key to select Options from the Tools drop-down menu. Finally, I ended the hotkey with the return followed by#IfWinActive to ensure any other hotkeys beyond this one aren't limited just to Firefox or Thunderbird (unless that's what you wanted).

Take Your Tweaks with You

The great thing about AutoHotkey is that you can compile your scripts to portable executables that can run anywhere by simply right-clicking the file and selecting Compile. Drop the resultant EXE on your thumb drive and take it with you wherever you go.

Source: http://lifehacker.com/316589/turn-any-action-into-a-keyboard-shortcut

Wednesday, July 28, 2010

What's Useful in the Safari Extensions Gallery

Friendly Computers would like to help you to choose some useful Safari Extensions.

Safari's Extensions Gallery has gone live, and there's quite a bit to look through and add to your browser at launch. We took a gander through the offerings and picked out some of the extensions worth noting. Here's the list.

To use these extensions, you'll need to have Safari installed, and have it updated to the latest version. Both Macs and Windows installations have Apple's updating software you can use to grab the 5.0.1 copy, but if you've disabled Apple's Software Update on Windows, you'll need to grab a fresh copy manually.

We've provided links to the extension maker and a direct installation link for each extension we picked out, with each link coming from the extension maker. You may be asked whether you want to Open or Save the file we're linking to (choose "Open"), and if you're sure you want to install that extension ("Install," we presume). To manage these extensions once you've got them installed, head to your Safari preferences and look for the newly-enabled Extensions menu.

Social Networking

What's Useful in the Safari Extensions GalleryBetter Facebook: Automatically hides posts you've already read, removes some of the cruft from the site, notifies you of new comments and un-friendings, and more. [Install in Safari]

Shut Up: Kills comments on many sites where you might get sick of them. [Install in Safari]

Bookmarking

Procrastinate: Adds text articles to bookmarking and reading services like Instapaper, Read it Later, and Delicious from an all-in-one toolbar button. [Install in Safari]

Twitter Tools

What's Useful in the Safari Extensions Gallery
Twitter for Safari: Twitter's official client for sending tweets, but also reading tweets and seeing Twitter profiles related to the page you're on. You can easily tweet about a page you're looking at, too, with a pre-shortened URL. [Install in Safari]

E-mail

GmailThis: Sends an email through Gmail's compose window, with the page you're on pre-loaded in the subject and body text. Basically, a fancy bookmarklet, but with a nice button. [Install in Safari]

What's Useful in the Safari Extensions GalleryTrueNew Count for Gmail and Google Apps: More than just providing a count of the messages marked unread, TrueNew's counter shows you how many messages are unread since the last time you looked at Gmail or Google Apps. [Install in Safari]

Shopping

InvisibleHand: Like the Firefox and (slightly scandalous) Chrome extensions, InvisibleHand checks the shopping item pages you're looking at to see if the item is offered elsewhere—Amazon, Buy.com, and the like—at a cheaper price. [Install in Safari]

Entertainment

A Cleaner YouTube: Claims to transform YouTube into a "quiet and peaceful place" by cutting out most of everything except the video itself. [Install in Safari]

Turn Off the Lights: As with its nifty Chrome counterpart, this little button throws a shade over everything except the video you're watching on YouTube, Vimeo, or embedded clips. [Install in Safari]

Security

What's Useful in the Safari Extensions Gallery
LastPass: One of our favorite universal password systems, LastPass is an elegant little plug-in for storing your passwords, filling them in automatically, and yet keeping them encrypted and available anywhere you go. [Install in Safari]

Web of Trust: Reads out everything the very excellent Web of Trust community knows about the site you're on—encryption, trustworthiness, vendor reliability for various components, and so on. [Install in Safari]

Photos

Awesome Screenshot: Like its Chrome counterpart, Awesome Screenshot handles the capture, annotation, sensitive data blurring, and upload/sharing aspects of grabbing web pages, no extra software needed. [Install in Safari]

Source: http://lifehacker.com/5598524/whats-useful-in-the-safari-extensions-gallery

Tuesday, July 27, 2010

Make Your Own 'Transparent' Display

Friendly Computers would like to help you make your own “transparent” display.

Once you've seen some amazing pictures of seemingly transparent LCD screens, you may want to create your own optical illusion. After researching the topic, I wanted to give it a try, too. So I'm going to show you the simplest way I've found to create the effect. All you'll need is a digital camera, photo-editing software, and about an hour to produce the image.

In this step-by-step guide, I use Gimp, the free photo-editing software for Windows, Mac, and Linux; but any standard photo editor that can produce layers and perform basic editing will work as well.

Take Your Photos

Before you get started, you need to determine (and write it down for later reference) your screen's resolution. Microsoft has two online tutorials--one for Windows 7 usersand one for Windows Vista users--that show how to obtain this spec.

Next, you need to take a photo with your computer screen in the frame, and another without your screen in the frame. If you're using a laptop, the only adjustment you have to make is to fold the clamshell down before taking the second shot. Desktop users must remove their monitor from the desk entirely to achieve the right effect. You should also mark the location where your monitor sits on your desk with tape or pencil. This will make it easier to restore the screen to the right spot later on.

Problems with bright light; click for full-size image.When taking your photo, make sure that you have enough light in your environment, but avoid having a strong light source--like the sun or a bright light--directly behind you, as it could cause screen glare in your final picture, decreasing the illusion of transparency.

The other key is to be sure to take two shots at an identical angle.The best approach is to mount your camera on a tripod. If you don't have a tripod, you can create a makeshift one. To take my shots I just used my nightstand, with a few boxes piled on top of it. You should also turn off your display or give your desktop a solid color background. This will simplify the task of editing the screen in your photo-editing software later on.

When it comes time to take your final shot, you may want to use your camera flash or to be in a room with a lot of natural light. This is because both light sources help create the transparency effect in your final shot. But if you use a flash, take care to use an angle that doesn't let the flash slip onto the screen. In the experimental shot above, the shot is pretty good overall, but the flash ruins it.

Tip: Have at least two items that run beside and behind the screen. Doing so will make it easier to line up your final shot later, and it will add to the transparency effect.

After you've captured two shots that you like you can upload them to your computer. Here's how my two photos looked initially:

Tip: If you're using a laptop, try not to move the base of your computer at all from start to finish of this project. That way, the only adjustment you'll have to make will be to the screen angle when lining up your final shot.

Layer Your Photos

The first thing to do after you've uploaded your photos is to layer them. The shot with the screen should be on top, and the photo without the monitor should be on the bottom. The reason will become clear in a moment. Once you've layered the two photos, you need to align them. To do this in Gimp, select the image with the monitor in it, and then click Select, All from the menu bar. Then choose Edit, Copy to copy the entire picture. Now, go to the second photo, and click Edit, Paste As, New Layer.

At this point, you need to align the two photos by selecting Image, Align Visible Layers. Be sure to uncheck Ignore the bottom layer even if visible, and instead checkUse the (invisible) bottom layer as the base.

Frame Your Screen

Next, you want to use Gimp's Free Select Tool (in Photoshop it's called the "polygonal lasso") to frame your screen. This type of lasso is easy to use since you have to create a closed shape to complete your cut. Don't use a magic wand or any other tool to do this, as you aren't going to cut out the contents of the top image; rather, the photo of your monitor is merely serving as a guide.

Move to Layer Two

Selecting the second layer; click for full-size image.

Now that your cut is ready, it's time to get rid of the first layer so you can cut out the contents of the second layer. Open your layers dialog box, and in Gimp selectWindows, Dockable Dialogs, Layers.

Click the eye icon next to the top layer (the image with the screen visible). You should see the image without the screen, with the selection frame that you created in the previous step over the top. To copy the selected area and create a new file, clickEdit, Copy Visible, and then select File, Create, From Clipboard.

Size Your Transparency

All you have to do now is create your background desktop image. The best way to edit this part is to go into full-screen view. You should see that your new selection doesn't quite match up with the edges of the image canvas. To fix this, use the transform tool, but make sure you that have turned off the 'constrain proportions' setting. In Gimp that means making sure the link icon is broken in the transform tool dialog box.

Using the transform tool; click for full-size image.

Now, use the transform tool to push the edges of your photo until they just barely fill the entire canvas. Once you've done that, save your work (make sure you know the location of the saved image) and examine the final product to confirm that the canvas is filled.

At this point, you need to match your photo's dimensions to your computer screen's resolution. ClickImage, Scale Image, again make sure that the 'constrain proportions' setting is turned off, and adjust your photo size to match your screen resolution numbers. My laptop's screen, for example, has a resolution of 1200 by 800 pixels.

Set Your Background

The moment of truth has arrived. Set your resized image as your desktop background, grab your camera and tripod and get ready to snap your first transparent photo. In person, your transparent desktop background may not look like much, depending on the resolution of your camera. But bear in mind that the finished product is your final photo--not the actual desktop image.

My final shot; click for full-size image.

Take a look through your camera, and confirm that everything lines up. If you followed my earlier recommendation, several items will be running off your desktop screen--for example, a cord extending from the back of the monitor onto your desk, or a book that is partially blocked by your monitor. These items greatly enhance the transparency effect, and serve as guides for your monitor's angles. Remember to take your time, be patient, and get the best shot you can.

As you can see, my final shot didn't turn out too badly. I made a few lighting mistakes--but overall not a bad effort for a novice.

What Now?

After you've captured your final image, what you do is up to you. You can put it back into Photoshop and adjust its colors, lighting, and white balance; or if you feel that the image is good enough as is, you can simply declare victory.

Source: http://www.pcworld.com/article/201935/make_your_own_transparent_display.html

Friday, July 23, 2010

How To Play Your Favorite Retro Video Games on Your Windows PC

Friendly Computers would like to show you how to play your favorite retro video games on your Windows PC.

Do you miss the days of playing your favorite games on “old school” consoles like SNES or Sega Genesis? Today we take a look at several different emulators for your PC that will bring back the retro gaming nostalgia.

Note: Here we are covering retro video game emulators so you can play classic games on your PC. We don’t link to any games or “roms” as their called, but Google could probably help you out with finding some.

We tested these emulators on Windows 7 Home Premium 32-bit but they should work with Vista and XP as well. We did however run into a lot of snags running some of them on a 64-bit system.

8-bit Nintendo (NES)

The first one we’ll take a look at is the 8-bit NES emulator FCEUX. It works very smoothly and controls are very responsive. There are a few different NES emulators out there and this on worked the best in our tests. Just download the file and unzip it to whatever directory you want. Then launch the FCEUX executable.

sshot-2010-07-21-[19-51-48]

Now you can load a game or go through it’s various settings to tweak it how you like. Click on File \Open ROM…

sshot-2010-07-21-[19-37-10]

Browse to the game you want to play and double-click to load it. You don’t need to unzip your ROM files, just load them up. Here we take a look at Mario Bros in a small window which would be useful at work if you run it from a Flash drive.

sshot-2010-07-21-[19-46-00]

If you want to change the emulator settings while playing a game you can…and while your making the changes your current game will pause.

sshot-2010-07-21-[19-41-28]

It also has a very nice full screen mode…

sshot-2010-07-21-[19-43-59]

Download FCEUX

Super Nintendo (SNES)

For playing SNES games we chose the ZSNES project. Download and unzip the ZSNES package and click on zsnesw.exe to start it up…no installation needed.

sshot-2010-07-18-[22-27-00]

The emulator will start and you can load a game right away and begin to play…or go through and configure it to your liking.

sshot-2010-07-18-[21-56-51]

There are a lot of settings you can customize including Video, sound, the controls, and more.

sshot-2010-07-21-[18-24-54]

Ah, the good old days listening to cheesy music and reading a long intro about the story. Luckily it allows you to skip straight to the game by pressing Enter.

sshot-2010-07-21-[18-40-02]

Here we take a look at playing the Ninja Gaiden Trilogy. The game play is smooth and controls were responsive. Sometimes the frame rates would slow down but over all it wasn’t too bad.

sshot-2010-07-21-[18-27-04]

We’d be remiss if we didn’t show one of the coolest games for the SNES…Super Mario World.

sshot-2010-07-21-[18-49-17]

One issue we noticed when closing out of ZSNES from the Taskbar, it was still running in the background. We had to end the process through Task Manager.

sshot-2010-07-21-[18-40-57]

If you want to correctly close out of the emulator, while playing a game hit the Esc key. This will bring up the ZSNES menu where you can quit. Of course you can also change configurations and save your progress as well.

sshot-2010-07-21-[22-01-56]

Download ZSNES

Gameboy Advance

Remember the Gameboy Advance handheld gaming system? There is a very nice emulator project for that too called Visual Boy Advance. As with the others, no installation is required. Just unzip the VBA file and run the VistualBoyAdvance executable.

sshot-2010-07-21-[20-53-08]

Click on File then Open and browse to your game. Again, you don’t need to unzip the ROMS just select them and the game will start.

sshot-2010-07-21-[20-56-12]

Here we have a version of Zelda running. Graphics are great and controls very responsive.

sshot-2010-07-21-[21-01-53]

If you need to change some settings while playing playing a game, just select them from the toolbar and your game will pause while you make adjustments.

sshot-2010-07-21-[21-02-50]

If you have a game that has a long intro, and it doesn’t let you skip it, you can hold down the Spacebar and speed right through it and get to the action.

sshot-2010-07-21-[21-13-41]

sshot-2010-07-21-[21-17-55]

Download Visual Boy Advance

Sega Genesis

One of the best Sega Genesis emulators we found was Kega Fusion 3.6 which ran great on our Windows 7 Home Premium machine. Again simply unzip the file and launch the Fusion executable file…no installation required. If you have Aero enabled it will need to run in basic mode to work.

sshot-2010-07-21-[20-14-13]

When it starts go to File and from there you can load games from the different Sega console versions they used to have out like the MasterSystem.

sshot-2010-07-21-[20-06-53]

The select your ROM…you don’t need to unzip the files. In fact that seems the case with all the ones we tested.

sshot-2010-07-21-[20-02-04]

The games we tested ran smoothly, the video looked great, and the controls were responsive.

sshot-2010-07-21-[20-05-49]

You can resize the window easily including Full Screen.

sshot-2010-07-21-[20-10-30]

sshot-2010-07-18-[23-05-15]

You can configure the controllers to whatever works best for you. We were even able to get the XBOX 360 Controller for PC to work by assigning it controls.

sshot-2010-07-21-[20-21-05]

Being able to customize the controls can really come in handy when you’re playing a game such as the classic Mortal Kombat!

sshot-2010-07-21-[20-12-42]

Download Kega Fusion

Nintendo 64

By far the best Nintendo 64 emulator is Project64. It’s had some updates over the years and does a great job of emulating the N64 experience. This one you do need to install…just follow the install wizard as normal.

sshot-2010-07-21-[20-32-31]

After installation you’ll find it under Project64 in the Start Menu.

sshot-2010-07-21-[21-21-57]

Launch Project64 and select your language…

sshot-2010-07-21-[20-40-22]

To load a game click on File then Open Rom…

sshot-2010-07-21-[21-24-12]

Navigate to where your game is and double-click to start it up.

sshot-2010-07-21-[21-26-35]

sshot-2010-07-21-[21-34-03]

There are many neat customizations you can do with the controls. We were able to configure an XBOX 360 Controller for PC on many of the games and they were responsive. Because N64 had such an odd controller, it might be a good idea to take a look at one so you can adjust the buttons correctly.

sshot-2010-07-21-[20-41-10]

There are also other options like changing the graphics and audio settings. The settings you can use will be based on your computer’s hardware.

sshot-2010-07-21-[20-41-39]

Once you get your settings and controller setup, this emulator is very cool if you were a fan of N64 back in the day. The graphics are great and the frame rate was very smooth on most games.

sshot-2010-07-21-[21-40-34]

The games play basically like the originals with previews of the games, intros, and levels.

sshot-2010-07-21-[21-35-35]

Download Project64

Conclusion

Using emulators is a great way to re-live the glory days of your youth. Keep in mind that most are still works in progress while others have stopped development. They don’t always run perfectly either, we had problems with several of them on our Windows 7 64-bit system. If you’re worried that they might crash your system, you can always create a Virtual Machine provided you have enough system resources, and run them in there. Here is an example of running ZSNES on XP in VMware Player.

sshot-2010-07-21-[21-59-34]

Overall, these are some great emulators that will allow you to play your favorite classic games. Remember they are emulators so some of the games may not run as perfectly as they do on the real system.

Source: http://www.howtogeek.com/howto/22721/how-to-play-your-favorite-retro-video-games-on-your-windows-pc/