Ofer For You (1)

Wednesday 24 September 2014

Create Any Windows Shortcut You Want



Have you ever wanted to do everything in Windows with a simple key combination? This trick will let you open, say google, with a key combination of Alt+G or Ctrl+G or anything else of your choice.

This will barely take 2 minutes to learn.

There is this very simple tool called Autohotkey. This tool does the following things:
  1. Define hotkeys for the mouse and keyboard, remap keys and buttons and autocorrect-like replacements.
  2. It can create standard Graphical User Interfaces with controls for entry presentation.
  3. Parse feeds from a variety of sources for processing and manipulation with regular expressions.


The above image, shows one such usage.

Say, you are sending an email to someone and you end with a signature at the end which is routine. Why write it every time? Instead just automate it.
Pressing "Ctrl + Alt +S" will add your signature to the Email.
Also, "btw", will expand to "by the way". There are many such uses.

How Is It Used?

To use autohotkey, follow these steps:
  1. Install Autohotkey from here: Autohotkey 
  2. Right-click an empty spot on your desktop or in a folder of your choice.
  3. In the menu that appears, select New -> AutoHotkey Script. (Alternatively, select New -> Text Document.)
  4. Type a name for the file, ensuring that it ends in .ahk. For example: Test.ahk
  5. Right-click the file and choose Edit Script.
  6. On a new blank line, type the following:
      #space::Run www.google.com

In the line above, the first character "#" stands for the Windows  key; so #space means holding down the Windows key then pressing the  spacebar to activate the hotkey. The :: means that the subsequent  command should be executed whenever this hotkey is pressed, in this case  to go to the Google web site. To try out this script, continue as  follows:
  1. Save and close the file.
  2. Double-click the file to launch it. A new icon appears in the taskbar notification area.
  3. Hold down the Windows key and press the spacebar. A web page opens in the default browser.
  4. To exit or edit the script, right-click the green "H" icon in the taskbar notification area.
There it is. You have just used the Windows Key+Space to open google.com. 

More Examples

  1. Launching a Program or document
    The Run command is used to launch a program, document, URL, or shortcut. An Example is:


    A hotkey can be assigned to any of the above examples by including ahotkey label. In the first example below, the assigned hotkey is Win+N, while in the second it is Control+Alt+C:

    The above examples are known as single-line hotkeys because each  consists of only one command. To have more than one command executed by a  hotkey, put the first line beneath the hotkey definition and make the last line a return. For example:
  2. Manipulating Files and Folders
    To add text to the end of a file (or create a new file), use FileAppend as shown in the following example. Note that it uses `n (linefeed) to start a new line of text afterward: 


    To overwrite an existing file, use FileDelete prior to FileAppend. For example:


    Some of the other commonly used file and folder commands are:
    FileRead: Read the entire contents of a file into a variable.
    File-reading Loop
    : Retrieve the lines in a text file, one by one.
    IfExist
    : Determine whether a file or folder exists.
    FileSelectFile
     and FileSelectFolder: Display a dialog for the user to pick a file or folder.
    FileDelete
    /FileRecycle: Delete/recycle one or more files. UseFileRemoveDir to delete an entire folder.
    FileCopy
    /FileMove: Copy/move one or more files. UseFileCopyDir/FileMoveDir to copy/move an entire folder.
    Files-and-folders Loop
    : Retrieve the files and folders contained in a folder, one at a time.
    FileSetAttrib
     and FileSetTime: Change the attributes or timestamp of one or more files.
    IniRead
    IniWrite, and IniDelete: Create, access, and maintain standard-format INI files.
    RegRead
    RegWriteRegDelete, and Registry Loop: Work with the Windows registry.
  3. Graphical User Interface
    The GUI options are a bit lengthy, so I would like to link the documentation here, rather than typing it here. So here is the documentation: GUI 

There are many more uses. The possibilities with this tool are truly vast. On a concluding note, I would like to give some scripts here:
  1. AutoHotkey Script Showcase 
    These scripts have been submitted to the official site and there are many scripts on this link. The description is given on the page itself.
  2. Show Us Your Best AutoHotkey Script
    See the comments on this lifehacker page. They contain some gems.
  3. The Best Time-Saving AutoHotkey Tricks You Should Be Using
    This lifehacker page enumerates some tips and tricks of using this tools.


By "Kunal Vohra", Director@H2K

Still Having Problem..!!! Connect with Admin
BBM: 7F72A48D


 Kunal Vohra
Download Our Official Android App & Get Free Internet



"The Hackers Street"

For Daily Updates 

No comments:

Post a Comment