2. Copy and paste the following line into the Notepad document: CapsLock :: Send {Volume_Mute} 3. Save the file as Mute.ahk . 4. Double-click the file to run it.
Now, when you press Caps-Lock, your speaker system will be dumb. Pressing it again will be returned to the original open state.
If you want to temporarily disable this feature, right-click the AutoHotKey icon in the System Tray and select Suspend Hotkeys .
2. Auto-Complete when typing text
Auto-Complete is a pretty useful feature in text typing, whenever you type a previously defined abbreviation, for example, type qtm , then the AHK will replace it with the phrase " quan tri bearing ". This is a way to save a lot of time with repeating phrases many times in any editor.
Here is how to set Auto-Complete in AHK
Run AutoHotkey.
In certain open areas on the desktop, right-click on it and select New, AutoHotkey script.
Enter the name of the script (in this case qtm.ahk ) and press Enter .
Right-click this file and select Edit Script.
Find a blank line and type in it :: qtm :: bring
Choose File, Exit, andsaveyour changes.
Right-click the file and select Run Script.
Now, whenever you type qtm and press a space or a punctuation mark, AHK replaces it with the phrase "mind bearer ".
3. Restore the folder function of Backspace key
If you're a fan of keyboard shortcuts, you'll probably find that in Windows Vista and Windows 7, the Backspace key doesn't work the same as in Windows XP. It can still undo the characters to the left of the cursor - however when you view the folders in Windows Explorer, Backspace will not bring you up to a folder in its tree architecture as in XP.
However with AHK, you can use the following code to make the Backspace key function as it is in XP - in the folder navigation perspective. We will only provide you with the code, and the remaining steps will be similar to the sections above.
When you make a copy and paste a text from a certain web page into your blog tool, or Word to Web often appears unwanted formatting. Now AutoHotkey can solve your problem with the following code:
$ ^ v ::
ClipSaved: = ClipboardAll; save original clipboard contents
clipboard =% clipboard%, remove formatting
Send ^ v; send the Ctrl + V command
Clipboard: = ClipSaved; restore the original clipboard contents
ClipSaved =; clear the variable
Return
$ ^ + v ::
Send ^ v; just send the regular paste command
Return
5. Delete Outlook emails with one click
You can change the function of your middle mouse button for certain programs. Using the following code in AHK will allow you to delete emails in Outlook inbox by clicking the middle mouse button on them.
;Lets delete Outlook emails with a wheel button ; By Grigory Shevchenko # SingleInstance, Force #NoEnv #IfWinActive ahk_class rctrl_renwnd32 ~ MButton :: MouseClick, Left sleep 10 Send, ^ d return
6. AutoCorrect when typing text
This is an old script, but spelling errors are not 'outdated'. It contains thousands of common spelling errors and when you make an error, it will immediately replace it with the correct word. It even allows you to edit your own words.
Download : Script for AutoCorrect.
7. Disable the Lock key
Three Lock keys - Num Lock, Caps Lock and Scroll Lock - are not really used frequently. You can just use the numeric keypad, never press Caps Lock except accidentally click on it and don't even know what Scroll Lock is used for. Except Windows will play a sound when pressing this key, but try setting them with a default value other than this script.
;Đặt thiết bị khoá SetNumlockState, AlwaysOn SetCapsLockState, AlwaysOff SetScrollLockState, AlwaysOff return
This script will cause Num Lock keys to always turn on and disable CapsLock and Scroll Lock keys. If you want to turn off the NumLock key, you can change it to Off or delete it.
8. Reset functions for Caps Lock
Once you have used the above code to disable Caps Lock, you can set it up with another function.
Using this script will turn Caps Lock into another Shift key, you can even change it to anything you want (maybe another Windows key):
;Turn Caps Lock vào một khoá Shift Capslock :: Shift return
9. Quickly view or hide hidden files
If you want to access the hidden folders in windows then this is the script for you. This script simply means you press the Windows + H key with any folder to view hidden files or folders.
Download : Script to view hidden files.
10. Quickly display or hide the file extension
Similarly, sometimes you want to see the file extension of each file. This is useful if you have multiple files of the same name or want to make sure that the content you have downloaded is a PDF file and not a dangerous .exe file. The script below will allow you to enable / disable the file extension for files with the Windows + Y key .
Download : Script displays the file extension.
11. Insert special characters
Although your keyboard has some special characters (like @ or *), there are dozens of other characters you need to use and don't want to look in Symbol of Word or hunt for Alt codes. So let this AHK code help you.
Have you created an icon, a character with the Alt key you know?
Using the form below to create a shortcut will be useful for you. The characters on the left are the characters you need to press to activate the shortcuts, while the symbols inside the quotes are what are inserted. So if you want to press ALT + Q to insert the trademark icon, you will type:
! q :: SendInput {™}
For references, characters for keys, you can read more about hotkey keys on the AHK manual page.
^ for CTRL
! for ALT
# for Windows
+ for Shift
12. Mimic the Chromebook's search key
Google's Chromebook has many personal shortcuts, Google has decided to remove Caps Lock keys that are not used often and replaced with search buttons on their machines. You can also get the same functionality with a simple script.
This will launch your default browser and search Google for any text you highlighted when pressing Ctrl + Shift + C. Very handy to reduce copy and paste time.
^ + c :: { Send, ^ c Sleep 50 Run, http://www.google.com/search?q=%clipboard% Return }
13. Use the numeric keypad like a mouse
This script will use the numeric keypad to act as a mouse, allowing you to move more accurately and in case your mouse is broken.
Download : Script using numeric keypad like mouse.
14. Launch any application
The launcher like Launchy is great for pulling any program installed on your computer in just a few seconds, but for more used programs, you may need a faster way. The following script opens a very simple application, you just need to press Windows + F to open Firefox.
#f :: Run Firefox
15. Paste into Command Prompt
Until Windows 10, you must right-click and select Paste to paste anything into a command line, the usual shortcut Ctrl + V does not work. But now with this script, you can use Ctrl + V to paste into Command Prompt as usual.