Questions tagged [autohotkey]

AutoHotkey (AHK) is a free, open-source macro-creation and automation software for Microsoft Windows that allows users to automate repetitive tasks. It is driven by a scripting language that was initially aimed at providing keyboard shortcuts, otherwise known as hotkeys, that over time evolved into a full-fledged scripting language.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

Focus a window under the mouse and send a hotkey

When pressing "Ctrl + WheelUp/Down" with the pointer under Chrome I would like to focus the Chrome window once and then send the ^+tab hotkey as shown in my code: Ctrl & WheelUp:: ...
0 votes
2 answers
33 views

Extract compressed file - Autohotkey

I have WinRar installed and I would like to know if the program has command line functions to extract the compressed files using a hotkey with autohotkey. I haven't found this, so I've seen other ...
0 votes
3 answers
110 views

Is there any way to keep my mouse moving continuously? (without using mouse jigglers)

There is an app that continously monitors all the other apps that I'm using, but it only registers me to be "working" if my mouse/keyboard is moving. So is there any way to get my mouse to ...
12 votes
2 answers
6k views

Windows virtual desktops: Cycle back to first desktop at end

Let's say I have three virtual desktops. I know I can navigate through them using: ctrl + windows + left | right However, is there a way to make it cycle back through to the beginning if I reach the ...
1 vote
1 answer
23 views

Shortcut to Open Folder in New Window with AHK

The problem: in Windows 10, at least version 1809, there is no shortcut to open a selected folder in a new window. Some say they can do it with ctrl-double click or ctrl-enter. None of this, however, ...
2 votes
6 answers
2k views

How to assign a hotkey to enable/disable Focus Assist on Windows 10/11?

To my surprise, there seems to not be a Windows hotkey for enabling/disabling Focus Assist on Windows 11. Is there a way to force such a hotkey, even if it requires the use of third-party software (...
2 votes
1 answer
65 views

Another Bracket Script issue

I use AutoHotKey to autocomplete all kind of brackets in the following way: typing ( gives ( -> opening brace bracket only typing (( gives () -> open & close brace with input ...
-1 votes
0 answers
41 views

Switch focus between two monitors using keyboard shortcut, in windows [closed]

I work on a multi-monitor set up, where I have 2 display monitors. I would like to be working on monitor 1, and then quickly switch focus to monitor 2 via a keyboard shortcut in order to continue ...
1 vote
1 answer
268 views

Swap LWin with LAlt not working properly

My workflow is: While working with the laptop keyboard, no changes needed While at the desk with ext monitor, use Apple external keyboard. Run AutoHotKey script to swap LWinwith LAlt. Kill AHK ...
0 votes
2 answers
250 views

AutoHotKey: Double press script from SetTimer malfunctioning

If a letter has modifiers and is being sent on this double press script from SetTimer, the triggering key`s preceding modifier(s), in this case shift, will be included on the letters along with any ...
2 votes
1 answer
46 views

How can I swap 2 keys for a specific language/KB layout on Windows 10?

I'd like to swap the W and ] keys, which are 'ჯ' and 'ჟ' on the desired keyboard layout, so that the W key outputs the latter character and the ] key the former, and only when said keyboard is in use. ...
0 votes
2 answers
465 views

How do I configure AutoHotKey to use mouse for shortcut?

I am trying to create a script that will change desktops based on the following: When I hold down the right mouse button (i.e right click) and then use the scroll wheel. Scrolling up should go to left ...
1 vote
1 answer
252 views

Using AutoHotKey to remap Ctrl to Alt while retaining Alt+Tab as Task View hotkey

I am a long (long) time Mac user, who has recently begun working in a company that uses Windows. I am using AutoHotKey to remap the Alt key to Ctrl, to mimic the placement of Mac's cmd key. The issue ...
0 votes
1 answer
5k views

What's the utility of the return command in autohotkey?

In the instances where the return command returns a value, the utility is obvious. I have seen the return command being used even when it is seemingly unnecessary. Let me show the following examples: ...
1 vote
2 answers
111 views

Reassigning left Win key + Tab to left control + tilde?

I want to reassign the left Windows key + Tab to left control + tilde permanently throughout the windows environment. Ideally I would hope to do that without third party software (e.g tweaking windows ...
0 votes
2 answers
738 views

Remapping Left Shift + up arrow to another key

Hi guys total AutoHotkey newbie here, I was wondering if any experts could help me with a quick script? I would like Left Shift & up arrow key to type the question mark key "?" And Left ...
1 vote
2 answers
90 views

How to combine Alt+Shift+1 into mouse right click

I am trying to combine Alt+Shift+1 to mouse right click with "AutoHotKey" in some online game. I know that ::send !+1 is alt+shift+1 but troubles in right click.
1 vote
2 answers
600 views

AHK: Open folder or activate it if already opened

I'm using autohotkey and try to do this: Open download folder (Q:\Down in my case) or activate it if already opened (subfolders don't count, for example still open Q:\Down if I opened Q:\Down\...
1 vote
1 answer
86 views

Windows: Remapping 'Shift + AltGr' to a single key? Easier access to '4th level' characters on international keyboards

By holding Shift + AltGr, the 4th level characters can be accessed on international layout on most operating systems: C → c (lowercase — first level) ⇧ Shift+C → C (uppercase — second level) AltGr+C →...
0 votes
3 answers
88 views

How to send '@' when type 'à' twice ("àà" = @) using AHK?

I have a question related to Hotstrings in AHK V 1.1.36.02. I want to write the character @ When I type à twice (àà = @). I've tried this, but it doesn't work: :*:àà::@ Notes : I do have an actual '...
0 votes
1 answer
251 views

Is it possible for Windows to only change focus to another window upon releasing the mouse click?

I would like to know if it is possible for Windows to only change focus upon releasing the mouse click? For example. I have Chrome full screen, and I download a file. Then I open Windows Explorer and ...
0 votes
3 answers
619 views

Is it possible to change the cursor indicator color depending on the input language?

on windows 10 there is an option to change the cursor indicator color (Win+I -> Ease of Access -> Text Cursor). I would love (even pay if there was an app for it) to change the text cursor color ...
24 votes
6 answers
13k views

Disable Ctrl+Z shortcut or clear undo history in Windows Explorer?

Is there any way to disable the CTRL+Z (Undo) shortcut in Windows Explorer? Alternatively, is there a way to have Windows Explorer "forget" its undo history? The reason I ask is that you may have ...
2 votes
1 answer
4k views

How to edit/change/modify the Syntax Highlighting Color in VS Code

How to edit/change/modify the Syntax Highlighting Color in VS Code, ie for Autohotkey and/or Markdown languages? For example: Im using the High Contrast theme (black background), and in that theme, ...
9 votes
4 answers
36k views

How do I figure out the installation path of apps from the Microsoft Store

I want to set up a hotkey tool called Autohotkey to open up a program called "Trello" when I hit a certain key combination. For that I need to know the absolute path of the program. The only problem ...
9 votes
4 answers
2k views

How can I assign a keyboard shortcut to increase/decrease the brightness of both my monitors?

I'm using a desktop PC with Windows 11 Home (22H2). I like operating my PC using keyboard shortcuts. I have used AutoHotkey (AHK) to control several things, such as increasing/decreasing the volume (...
0 votes
1 answer
118 views

MS Word shortcut key presses for inserting bookmark, sequence, and cross referencing? (Legacy menu Alt+I shortcuts)

It appears my MS Office had updated recently (2023, June/July), and some prior useful MS Word keyboard shortcuts no longer work. Are there any alternative keyboard shortcuts for the following items? ...
2 votes
2 answers
4k views

Connecting/Disconnecting to Bluetooth Device via CMD, PS, or AHK?

I'm at my wits' end right now. I'm on the latest version of Windows 10 and I just want to run a script to connect/disconnect to my Bluetooth headphones when executed. I've looked at a couple other ...
4 votes
3 answers
11k views

How can I toggle Bluetooth on and off via a shortcut on Windows 10 1903

I would like to emulated with a shortcut the process of 1) opening the Action Center and 2) clicking on the bluetooth icon. My solution was to use AHK to map a keyboard shortcut to running a .bat, ...
2 votes
1 answer
3k views

AHK is possibe to make this script works in inactive window

Is it possible to make this script work in a specific inactive/minimized window. ? loop { dllcall("keybd_event", int, VK, int, SC, int, 0, int, 0) dllcall("keybd_event", int, VK, int, SC, int,...
1 vote
2 answers
72 views

Why is the order of modifier keys important in AHK?

I'm using Autohotkey to perform a macro when Alt+Control+f is pressed within Electron. I have: #SingleInstance #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ...
5 votes
2 answers
5k views

How can I make AutoHotKey delete text in a web field?

I've seen a lot of info (here & elsewhere) about things you can get AutoHotkey to do with text once the user has selected it, but is there a way to have an AHK script select the text itself? I'm ...
0 votes
2 answers
4k views

AutoHotKey: Pressing two keys simultaneously without repeats

Is there a way to press two keys simultaneously and bind it to a macro key (for example, pressing "s" and "d" simultaneously and then bind it to "a" key) without it having the "s" repeat multiple ...
0 votes
1 answer
4k views

How to disable view page source in Chrome?

I need one help from you that is to block the page of viewing the source (original sites should be opened but source page must be blocked). I have almost come to the solution with the help of ...
0 votes
1 answer
123 views

hold CTRL+Double Left Click to open file location on shortcuts

I work with shortcuts of my files and folders very often. Currently we right click on a Shortcut and then look for Open file locationand click on it So... Do you know any method to achieve this easier/...
4 votes
2 answers
4k views

How to make AutoHotkey automatically close a pop-up dialog?

Question I'd like AutoHotkey to automatically detect when a certain pop-up dialog appears and take certain actions. How do I do that? Concrete example In my particular case, I'd like AutoHotkey to ...
0 votes
1 answer
65 views

How to trigger on alt without triggering on alt+shift and alt+ctrl

In ahk2 LAlt & l:: triggers on lalt+l, lalt+shift+l and lalt+ctrl+shift+l. I want it to trigger on lalt+l only. In other words I want it to NOT trigger on lalt+shift+l and lalt+ctrl+shift+l. Is ...
2 votes
3 answers
5k views

AutoHotkey scrolling & middle click & mouse acceleration

Problems Assume a Windows 7 machine, especially a laptop. No mouse driver allows holding down the right mouse button and moving the mouse to scroll, and yet retain the right mouse button ...
0 votes
1 answer
90 views

How to get caret positon in a text with AHK?

I want to assign a hotkey to do 3 clicks where the caret position is in a text to select a paragraph from a text on "Anki Add editor" (I don't want to press 3 clicks by mouse). For this ...
1 vote
2 answers
143 views

AutoHotPie radial menus [closed]

AutoHotPie is an app that I recently discovered and it displays a context sensitive radial menu. It has an option that interacts with autohotkey and I think it's possible to write custom scripts, but ...
0 votes
2 answers
104 views

AutoHotKey run cmd with pretyped text, without executing

Existing Q&A's handle running commands, but I simply wish to open cmd with pretyped text, since a part of the command changes with each use. Fully dummy example, I'd like to launch cmd with del &...
10 votes
7 answers
9k views

Prevent Windows Key from Opening Start Menu in Windows 7

I'd like to be able to stop the Windows Key from activating the Start Menu on Windows 7. I don't want to disable the Windows Key completely. I'd like Ctrl + Esc to still open the Start Menu. I know ...
0 votes
1 answer
80 views

Check if the pointer is on restore button of a window - autohotkey [closed]

I would like to know a piece of code that allows if the mouse pointer is over the restore "❐" button. I would like pressing and sliding the restore button to the side to split the current ...
0 votes
0 answers
120 views

Trying to make a macro with AutoHotkey and need assistance

I have been trying to write an AutoHotkey script that renames my game's instance and continues to send keystrokes to the game while I use my mouse and keyboard in a different window. The thing I've ...
0 votes
3 answers
1k views

Change Outlook calendar default option when editing meeting requests

I use Outlook from Office 365 to manage meetings with other people. Sometimes, after a meeting is set on our Outlook calendars, I want to edit notes associated with the meeting — but I don't want the ...
-1 votes
3 answers
3k views

autohotkeyahk | holding a mouse-button to hold another key?

UPDATED-STATEMENT: 20181102@112800@SUN Post created UPDATED-STATEMENT: 20181104@133200@TUE Suggested pre-requisite code that worked only for a short while UPDATED-STATEMENT: 20190101@184318@TUE Pre-...
2 votes
1 answer
111 views

Why is the Alt key released and pressed in AutoHotkey's KeyHistory?

I have an AutoHotkey script that sends the left arrow key when Alt + A is pressed. I also enabled KeyHistory. KeyHistory !a::Send "{Left 1}" When I open KeyHistory and press Alt + A, ...
1 vote
3 answers
83 views

How can I create a more-convenient hotkey for the Windows voice-typing feature?

I am trying to make heavy use of Windows' voice-to-type feature and find the Win + H hotkey to be less-than-ideal, because it isn't quick/easy to press with only my left hand when I have my right hand ...
0 votes
1 answer
141 views

How to close a specific program from the system tray Using AHK?

I have a specific program that is running in the system tray icon ("ahk_exe QTranslate.exe"), I want it to be closed automatically from the system tray icon if it is running whenever I open ...
0 votes
1 answer
83 views

How to automatically run a specific program when another specific program is closed?

I want ahk_exe QTranslate.exe to be running automatically in system tray as soon as another program ahk_exe pycharm64.exe is closed. I've tried this: Loop { if WinExist("ahk_exe pycharm64....

1
2 3 4 5
27