An open API service indexing awesome lists of open source software.

https://github.com/rafaelurben/autohotkey-utils

Some utils created with AutoHotkey
https://github.com/rafaelurben/autohotkey-utils

ahkv2 autohotkey autohotkey-script automation keybindings shortcuts

Last synced: 5 months ago
JSON representation

Some utils created with AutoHotkey

Awesome Lists containing this project

README

          

# autohotkey-utils

Autohotkey-utils gives you some useful utils as shortcuts in Windows.

This script...

- is portable (requires no installation, except for autostart)
- does not ask you for admin permissions (except to add it to autostart)
- allows you to use AutoHotkey hotkeys and hotstrings with no code knowledge and no AutoHotkey installation
- will update automatically if you accept its prompt to do so
- is written in [AutoHotkey v2](https://www.autohotkey.com/)

Jump to [setup](#setup) or [config](#config).

## Current Modules

Current modules are:

- [InstantSearch](#instantsearch) - quickly open search queries in different search engines
- [QRGenerator](#qrgenerator) - generate qrcodes from clipboard or input (using an online service)
- [ClipboardURL](#clipboardurl) - open url from clipboard
- [UrlShortcuts](#urlshortcuts) - save and open urls or run commands via shortcodes
- [Drive letter open](#drive-letter-open) - quickly open drives in explorer
- [Greek alphabet](#greek-alphabet) - quickly enter greek letters
- [AnyShortcut](#anyshortcut) - enter any shortcut as keyboard input, even if your keyboard lacks required keys
- [QuickNotes](#quicknotes) - create and manage quick notes
- [SoftLock](#softlock) - temporarily disable mouse and keyboard input via shortcut
- [PasteDateTime](#pastedatetime) - paste current date and time in a customizable format
- [Hotstrings](#hotstrings) - create custom hotstrings to replace text while typing
- [General actions](#general-actions) - some general useful actions

### InstantSearch

Enter a query to open it in a search engine. Can also take the query from the clipboard.

You can modify the used search engines via [settings](#settings).
Settings format: `SEARCHENGINE?||EngineName|EngineUrl` (where ? in [1,2,3])

When searching, the query is appended to the end of the URL, so it should end with `?q=` or similar.

| Action | Description | Default shortcut |
|---------------------------|-------------------------------------|------------------|
| InstantSearch_1_Clipboard | Search on DuckDuckGo from Clipboard | `Win+Q` |
| InstantSearch_1 | Search on DuckDuckGo | `Shift+Win+Q` |
| InstantSearch_2_Clipboard | Search on Google from Clipboard | - |
| InstantSearch_2 | Search on Google | - |
| InstantSearch_3_Clipboard | Search on Wikipedia from Clipboard | - |
| InstantSearch_3 | Search on Wikipedia | - |

---

### QRGenerator

Generate a QRCode from any text.

Note: Please use the clipboard action if you need to use multiline data.

| Action | Description | Default shortcut |
|---------------------------|-------------------------------------|-------------------|
| QRGenerator_FromClipboard | Use data in Clipboard | `Alt+Win+Q` |
| QRGenerator_InputBox | Open Input-Window to enter text/url | `Shift+Alt+Win+Q` |

---

### ClipboardURL

Open the URL from the clipboard directly in your default browser.

| Action | Description | Default shortcut |
|-------------------------|------------------------------------------------|------------------|
| ClipboardURL_Open | Open Url directly | `Win+O` |
| ClipboardURL_OpenEditor | Open Input-Window to modify URL before opening | `Shift+Win+O` |

---

### UrlShortcuts

Save URLs to open easily via shortcodes.

**ProTip**: You can also enter a file path or command to be executed instead of an url!

This module needs some configuration. (see [here](#create-url-shortcodes))

| Action | Description | Default shortcut |
|------------------------|--------------------------------------------------------------------------------------------|---------------------|
| UrlShortcuts_Insert | Press and enter a 2-char shortcode during a 2-second-timeframe to **paste** url or text. | `Insert` |
| UrlShortcuts_Open | Press and enter a 2-char shortcode during a 2-second-timeframe to **open** url or command. | `Ctrl+Insert` |
| UrlShortcuts_BoxInsert | Open input window and enter shortcode to **paste** url or text. | `Shift+Insert` |
| UrlShortcuts_BoxOpen | Open input window and enter shortcode to **open** url or command. | `Shift+Ctrl+Insert` |

---

### Drive letter open

Quickly open an explorer window with the desired drive.

| Action | Description | Default shortcut |
|-----------------|-----------------------------------------------------------|------------------|
| DriveLetterOpen | Press and enter a drive letter to open it in the explorer | `Shift+Win+E` |

Example: `Shift+Win+E c` opens the C: drive in the explorer.

Beside the drive letters, there are also some special keys for special folders:

- `.` opens the autohotkey-utils folder
- `~` or `-` opens the user folder

---

### Greek alphabet

Quickly enter a character from the greek alphabet.

| Action | Description | Default shortcut |
|---------------|----------------------------------------|------------------|
| GreekAlphabet | Press and enter the name of the letter | - |

Example: `Shift+Win+G Pi Enter` or `Shift+Win+G pi Enter` (these are not the same)

---

### AnyShortcut

Lets you enter any shortcut, which will be sent as keyboard input.
Especially useful for entering special characters via their Alt-Code or function keys like F13-F24.

After confirming the input, the script will wait for 1 second so you have time to focus the desired input field or
window.

| Action | Description | Default shortcut |
|-------------|------------------------------|------------------|
| AnyShortcut | Press and enter the shortcut | - |

---

### QuickNotes

Create notes on the fly or paste your clipboard for later use.

Note: Please use the open action if you need to enter multiple lines.

| Action | Description | Default shortcut |
|-------------------|------------------------------|------------------|
| QuickNotes_Create | Create e new note | - |
| QuickNotes_Open | View and edit existing notes | - |

---

### SoftLock

Disable mouse and keyboard input via shortcut. (Note: This only works when the script is run as administrator.)

Press `Win+L` or `Ctrl+Alt+Delete` to exit.

| Action | Description | Default shortcut |
|----------------|-----------------|------------------|
| SoftLock_Block | Block the input | `Shift+Win+L` |

---

### PasteDateTime

Paste the current date and time in a customizable format.

Uses the datetime format defined in the [settings](#settings).

| Action | Description | Default shortcut |
|---------------|----------------------------------|------------------|
| PasteDateTime | Pastes the current date and time | - |

---

### Hotstrings

This module needs some configuration. (see [here](#create-hotstrings))

---

### General actions

| Action | Description | Default shortcut |
|----------------|----------------------------------------|------------------|
| CloseProcess | Close a process by name | `Shift+Win+Esc` |
| Settings_Open | Open the settings page | `Shift+Win+i` |
| ReloadFiles | Reload the script and all config files | - |
| HoldRightMouse | Hold down the right mouse button | - |
| HoldLeftMouse | Hold down the left mouse button | - |

---

## Setup

You can install this script without AutoHotKey using the `*.exe` files found
under [Releases](https://github.com/rafaelurben/autohotkey-utils/releases). I recommend storing the `*.exe` in a
separate folder as your configuration files will be stored in the same folder as the `*.exe`.

The first time you launch the script, it will ask you if you want it to automatically start everytime you log in. If you
missed the chance to click yes, you can just delete the ".hotkey-temp.txt" file and reload the script.

Everytime the script reloads, it will check if there is a newer version of it available on this page and will ask you if
you want to update.

Note: Windows may warn you that this script is insecure, but you can ignore this warning as long as you download the exe
file from this repository. If you don't trust this exe file, you can also download the current .ahk file, but then you
must also install AutoHotkey v2. But please note that the update engine doesn't work when using the .ahk file!

## Config

You can configure and change some things in this little "app". You can open the settings via
`right click on the tray icon -> Settings` or via the defined keybind (default: `Shift+Win+i`).

You can also edit the settings in their corresponding config files. If you want to edit the settings manually, you can
find them in the `config` folder, which lies in the same folder as this script and can be opened via the settings
dialog > "Advanced" > "Open config folder". If you edit files manually, you must reload the script after saving to apply
the changes via `right click on the tray icon -> Reload` or via the defined keybind (default: `Shift+Win+R`).

### Create URL-Shortcodes

You can modify the shortcodes used for the [UrlShortcuts](#urlshortcuts) module in the settings. Use the following
syntax: `shortcode|url`

Example:

```txt
gg|https://google.com
yt|https://youtube.com
```

### Create Hotstrings

Hotstrings automatically replace certain strings while you're typing. E.g. you type "btw" and an ending character (
`-()[]{}:;'"/\,.?!`, tab or newline) and "btw" automatically gets replaced with "by the way".

You can create and modify hotstrings in the settings using the following syntax: `hotstring|replacement`

The hotstring syntax can be found [here](https://www.autohotkey.com/docs/v2/Hotstrings.htm). Note: Replace "::"
between hotstring and replacement with "|"!

Example:

```txt
:o:@gm|@gmail.com
::btw|by the way
:*:hi|hello
```

Common options:

| Option | Behaviour |
|--------|----------------------------------------------------------|
| o | Automatically removes ending character after replacement |
| ? | Allows hotstring to be IN a word |
| \* | Doesn't require ending character to trigger |

---

### Modify keybinds

You can modify the keybinds used in this app in the settings. Use the following syntax: `action|keybind`

Note: If the actions are not present in the file, the default values are used. If you want to disable a default hotkey,
enter the action without a keybind. (e.g. last line in example)

The keybind syntax can be found [here](https://www.autohotkey.com/docs/v2/Hotkeys.htm#Symbols). All available actions
are listed in the tables on this page. Common modifiers can also found in the table below.

Example:

```txt
InstantSearch_1_Clipboard|#Numpad1
InstantSearch_2_Clipboard|#Numpad2
InstantSearch_3_Clipboard|#Numpad3
GreekAlphabet|+#g
ReloadFiles|
```

Common modifiers:

| Modifier | Meaning |
|----------|-------------------|
| # | Windows-Key (Win) |
| + | Shift |
| ^ | Control (Ctrl) |
| ! | Alt |

---

### Settings

The search engines and datetime format can be changed via settings. The app provides a simple GUI to edit these
settings.

Check [this page](https://www.autohotkey.com/docs/v2/lib/FormatTime.htm#Date_Formats) for date formats.

#### Edit settings manually

If you want to edit the settings manually, you can find them in the `config/hotkey-settings.txt` file.

Use the following format: `Key||Value` (Note: Use "||" as a separator!)

Note: If the keys are not present in the file, the default values are used.

Default:

```txt
SEARCHENGINE_1||DuckDuckGo|https://duckduckgo.com/?q=
SEARCHENGINE_2||Google|https://google.com/search?q=
SEARCHENGINE_3||Wikipedia|https://en.wikipedia.org/wiki/Special:Search?search=
DATETIMEFORMAT||yyyy-MM-dd HH-mm-ss
```