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:
- Define hotkeys for the mouse and keyboard, remap keys and buttons and autocorrect-like replacements.
- It can create standard Graphical User Interfaces with controls for entry presentation.
- 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:- Install Autohotkey from here: Autohotkey
- Right-click an empty spot on your desktop or in a folder of your choice.
- In the menu that appears, select New -> AutoHotkey Script. (Alternatively, select New -> Text Document.)
- Type a name for the file, ensuring that it ends in .ahk. For example: Test.ahk
- Right-click the file and choose Edit Script.
- On a new blank line, type the following:
#space::Run www.google.com
- Save and close the file.
- Double-click the file to launch it. A new icon appears in the taskbar notification area.
- Hold down the Windows key and press the spacebar. A web page opens in the default browser.
- To exit or edit the script, right-click the green "H" icon in the taskbar notification area.
More Examples
- 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: - 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, RegWrite, RegDelete, and Registry Loop: Work with the Windows registry. - 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:
- 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. - Show Us Your Best AutoHotkey Script
See the comments on this lifehacker page. They contain some gems. - 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 AdminBBM: 7F72A48D
For Daily Updates
No comments:
Post a Comment