12 scripts for AutoHotKey make life easier

AutoHotKey is one of the best Windows automation programs that can perform from the simplest actions to the most difficult tasks.

AutoHotKey is one of the best Windows automation programs that can perform from the simplest actions to the most difficult tasks. AutoHotKey is a free and open source program that uses its own scripting language to automate all your daily Windows tasks. Although the scripting language sounds scary, in fact, it is very easy to use and you can do a lot of cool things.

TipsMake.com will share your favorite and most used AutoHotKey scripts, making your daily work easier.

Before starting, the article assumes that you already know how to install and configure AutoHotKey. If you are unsure of this section, please refer to the article: Create shortcuts with AutoHotkey to learn how to do this.

Besides, please note that the lines start with ';' are comments.

AutoHotKey scripts are useful for life

  1. 1. Google Search shortcut (Google search)
  2. 2. Auto correction
  3. 3. Reuse the function keys (Function key)
  4. 4. Open the website quickly
  5. 5. Open your favorite folder
  6. 6. Scroll to a folder in File Explorer
  7. 7. Adjust the volume
  8. 8. Set the default status for the Lock keys
  9. 9. Reconfigure Caps Lock
  10. 10. Empty the trash
  11. 11. The window is always at the top
  12. 12. Temporarily disable AutoHotKey

1. Google Search shortcut (Google search)

Google had the right idea when the Caps Lock key variable was unpopular and rarely used as a dedicated search button. In the spirit of Chromebooks, you can turn the Caps Lock key into a Google Search key.

The following script will automatically search Google when you highlight part of the text and press Ctrl + Shift + C :

 ; Google Search phần văn bản được highlight ^+c:: { Send, ^c Sleep 50 Run, http://www.google.com/search?q=%clipboard% Return } 

2. Auto correction

During Windows's existence, smartphones have grown so strongly that they now have touch screens and automatic error correction features. So why not automatically fix errors on Windows 10?

In Autohotkey's script repository, you can find autocorrected scripts, containing thousands of common spelling mistakes that most people can easily make, then automatically fix them when you write / create them. .

You can access the link to download the script here. Just press Ctrl + A to select everything in the script, then copy it to a Notepad file and save it as 'AutoCorrect.ahk'.

3. Reuse the function keys (Function key)

Most of us almost never use the function keys on the keyboard except F2 (rename), F5 (refresh) and F11 (full screen in the browser). Using AutoHotKey, you can reuse the unused function keys, to do many different things, such as launching web pages, launching programs, etc. For example, you can use the function keys to launch your most used programs like Snagit, Sublime Text, Photoshop, Calculator, Thunderbird, etc.

To launch a program, just use the script below. Don't forget to replace the program path with your favorite program.

 ; Khởi chạy Sublime Text F7::Run "C:Program FilesSublime Text 2sublime_text.exe" return 

4. Open the website quickly

Just like launching your favorite programs, you can create your own custom shortcuts to launch desired web pages. For example, you can use Ctrl + Shift + T to launch TipsMake.com. Use the following script to launch your favorite website. Don't forget to replace the web address with your favorite website.

 ; Khởi chạy TipsMake.com ^+t::Run "www.quantrimang.com" ; use ctrl+Shift+t return 

Like the way above, you can create your own shortcuts using a combination of Ctrl (^), Shift (+), Alt (!) And Win (#) keys .

5. Open your favorite folder

Along with opening websites and programs, you can also open the most used folders with a simple shortcut. For example, most of us often access the Downloads folder and to make it easier, we can use a simple script like the one below. You can customize the script to change the shortcut and directory path according to your needs.

 ; Mở thư mục Downloads ^+d::Run "C:UsersVamsiDownloads" ; ctrl+shift+d return 

6. Scroll to a folder in File Explorer

When in a folder, you often need to move up a folder. In previous versions of Windows, the Backspace key did this work, and now the Backspace key will take you back to the past. This is useful for many people, but others hate having to click on that little icon to move up a folder, so they use the script below to do the same by clicking on middle mouse button.

 ; Nhấn nút chuột giữa để di chuyển lên một thư mục trong Explorer #IfWinActive, ahk_class CabinetWClass ~MButton::Send !{Up} #IfWinActive return 

If you wish, you can also reconfigure the useless tilde ( ~ ) key on the keyboard to perform the same action.

 ; Nhấn ~ để di chuyển lên một thư mục trong Explorer #IfWinActive, ahk_class CabinetWClass `::Send !{Up} #IfWinActive return 

Picture 1 of 12 scripts for AutoHotKey make life easier

7. Adjust the volume

The keyboard does not have any multimedia keys and the lack of volume controls causes discomfort for many users. So you can use the following script to control the volume on your system.

 ; Nút âm lượng tùy chỉnh +NumpadAdd:: Send {Volume_Up} ;shift + numpad plus +NumpadSub:: Send {Volume_Down} ;shift + numpad minus break::Send {Volume_Mute} ; Break key mutes return 

Picture 2 of 12 scripts for AutoHotKey make life easier

8. Set the default status for the Lock keys

Using AutoHotKey, you can easily set the default or permanent status for Lock keys on your keyboard. For example, set Caps Lock to turn off or Num Lock to turn on and Scroll Lock to turn off. This simple script is very useful and even if you accidentally press them, the lock status will not change.

 ; Trạng thái khóa mặc định SetNumlockState, AlwaysOn SetCapsLockState, AlwaysOff SetScrollLockState, AlwaysOff return 

9. Reconfigure Caps Lock

After turning off Caps Lock , you may want to reconfigure it to act as a Shift key. To reconfigure the Caps Lock key, use the script below.

 ; Caps Lock hoạt động như Shift Capslock::Shift return 

10. Empty the trash

You can use the script below to quickly empty the trash. This simple script helps you not to use the mouse to perform the same task.

 ; Làm rỗng thùng rác #Del::FileRecycleEmpty ; win + del return 

Picture 3 of 12 scripts for AutoHotKey make life easier

11. The window is always at the top

Sometimes you just want a window to stay at the top, whether you're working or focusing on another window. For example, when working on a spreadsheet, you can access the computer application regularly and want to put it on a spreadsheet for more convenience. Using AutoHotKey, you can easily do this with a single line of code.

 ; Luôn ở trên đầu cùng ^SPACE:: Winset, Alwaysontop, , A ; ctrl + space Return 

The original script was published by labnol.org.

12. Temporarily disable AutoHotKey

Shortcuts created with AutoHotKey can sometimes interfere with some programs. In those cases, you can temporarily disable AutoHotKey using the script below. Of course, if you don't want to use keyboard shortcuts, just right-click the AutoHotKey icon on the taskbar and select the 'Suspend Hotkeys' option.

 ; Tạm dừng AutoHotKey #ScrollLock::Suspend ; Win + scrollLock return 

Picture 4 of 12 scripts for AutoHotKey make life easier

As you can see, all the above shared scripts are very basic but can make things easier. Besides easy things, you can perform all the complicated tasks like automatically emailing, managing the program, automating some Windows tasks, automatically correcting spelling mistakes, etc.

Hope these scripts will help you. If you are also using AutoHotKey, share your favorite scripts in the comment section below!

Good luck!

Update 31 July 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile