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.

368 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
13 votes
4 answers
2k views

automate so that if and only if external monitor is attached, closing laptop lid does nothing

Please don't mark as duplicate before reading the whole thing. I have read the other posts and they do not solve my issue. I'm using a laptop with an external display. When the display is connected, ...
user avatar
  • 197
9 votes
2 answers
5k 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 ...
user avatar
  • 201
5 votes
0 answers
2k views

Is there any way to type the clipboard to the guest in VMware

Similar to this question for VirtualBox: How do you auto-type the contents of the clipboard from the host into a guest Virtual Box instance? Is there any way to type the contents of the clipboard to ...
user avatar
4 votes
0 answers
2k views

I Need to Keep a Window Active

I need to keep a browser window active while I use another window. "Keep-on-Top" is not what I'm looking before because when I switch pages, it still goes inactive. I'm trying to keep a page ...
user avatar
  • 41
4 votes
0 answers
2k views

Set Scaling of individual applications in Windows

I occurs to be that I want any app I'm not looking at to be scaled down (to say 100%), but the one in focus to be scaled up (to 200%). This would both make maximal use of my hi-res laptop screen for ...
user avatar
4 votes
0 answers
596 views

Are there any other modifier keys on Windows?

I'm trying to use the Win key as a modifier key on Windows. So far, the best approach I found is to map it to another key using AutoHotKeys. For example, I can map the left Win key to the left Control ...
user avatar
  • 10.2k
4 votes
0 answers
3k views

Windows 10 Volume Mixer fails to keep System Sounds muted over Remote Desktop Connection

The problem: after having muted the System Sounds on the remote desktop machine, it shall unmute itself after several seconds. This pattern is persistent. The physical setting: I use my laptop at work,...
user avatar
  • 837
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 ...
user avatar
  • 1,783
4 votes
1 answer
913 views

Switch any program to kiosk mode

Sometimes friends or even unknown people visit me and we are doing something on my computer. I often find myself in the situation when I want to leave the computer but I don't completely trust the ...
user avatar
  • 41
3 votes
1 answer
970 views

How do I make AutoHotKey on my host OS still work even when I have my VMware virtual machine in fullscreen or focused?

I have numerous shortcut keys defined in my AutoHotKey script. I'm completely crippled without them. They normally work, but whenever I have focused my VMware virtual machine, or when I'm "immersed" ...
user avatar
  • 31
3 votes
1 answer
177 views

How can I recover an autohotkey script that has been over-written

I have an autohotkey script that is continuously running on my computer. I inadvertently saved a blank script over it, but the original is still running in the background. I tried to recover the ...
user avatar
3 votes
0 answers
495 views

AutoHotKey: Odd window sizing behavior on Windows 10

I realise this is probably a really obscure problem but hey it's the internet. I have a 24" portrait monitor, and I wanted vertical snapping. I found an online script, but for most types of windows, ...
user avatar
  • 131
3 votes
1 answer
656 views

Remap of Browser_Home key fails when browser window is not in focus

I have a bluetooth remote with a Browser_Home key, which I'm attempting to remap with AutoHotkey on my Windows 10 machine. By default, pressing Browser_Home does one of two things: If the window in ...
user avatar
  • 165
3 votes
0 answers
1k views

Monitor file change in AutoHotkey without a loop or timer

I am interested in having an .ahk file reloaded automatically whenever it changes. The reason is that I am hosting my .ahk files in Google Drive, and so the script may be changed on a running computer ...
user avatar
  • 1,398
3 votes
0 answers
3k views

Passing control hotkeys to VirtualBox with AutoHotKey

I use VirtualBox on Windows 10 host, and my guest OS is linux openSUSE. Since I still need many windows control hotkeys, I do not use Auto Capture Keyboard in VirtualBox. As a drawback, I can't use ...
user avatar
  • 173
3 votes
0 answers
248 views

Get value for `Position` property from a Delphi TProgressBar class instance using AutoHotkey (ahk)

I would like to obtain the current Position (progress) property value from TProgressBar1, which is a child of TProgressFrame1 and grandchild of TPanel1 within a particular TProgressDlg Window. ...
user avatar
  • 285
2 votes
0 answers
2k views

Remap Bluetooth headset button on Windows 10?

I have Bose QC 35 II and I am trying to get the Multifunction button to mute/unmute calls in MS Teams. For the purpose I will be using AutoHotKey, but in order to do that I need to capture the message ...
user avatar
  • 198
2 votes
2 answers
2k 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 ...
user avatar
2 votes
0 answers
29 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. ...
user avatar
  • 21
2 votes
1 answer
542 views

UAC: Autohotkey calling the Windows 10 command window; es.exe by Voidtools Everything

New readers please (just) read my second edit. (Original title: "UAC: Cannot use the command window anymore with Autohotkey (Windows 10)", intermediate title: "UAC: Cannot run es.exe (Voidtools ...
user avatar
  • 21
2 votes
0 answers
35 views

Holding Shift and Click solution

I`m trying to make a simple macro shift and left click are hold for 20 sec and durring that time another key is in the loop for this 20 sec. Seems like after shift and click are down nothing else i ...
user avatar
2 votes
1 answer
305 views

How to highlight focussed window using bug.n

I'm using bug.n which is based on autohotkey for my window manager on Windows 10 and want the window with current focus to be obvious by having a coloured border like the top left window in the image ...
user avatar
  • 893
2 votes
1 answer
105 views

Prevent Winkey + Alt + Enter from opening Windows Media Center and rebind it

I've bought a new remote control and am using AHK to rebind some of its buttons. It doesn't have a software to set what each button will do, "it just works". Using KeypressOSD.ahk I'm able to see ...
user avatar
  • 285
2 votes
1 answer
3k 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, ...
user avatar
  • 111
2 votes
0 answers
155 views

How to prevent window popup when new program starts?

Say I launch Firefox when reading a PDF. To prevent distraction, I want it to open silently until I manually switch to it. Is there a way to do this? All the search result I found is about JavaScript ...
user avatar
  • 1,771
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,...
user avatar
2 votes
1 answer
1k views

Autohotkey: Use Appskey as modifier, suppress context menu

AppsKey & t:: Send Test This prints 'est' and opens the menu. I would like it to print 'Test' and to not open the menu.
user avatar
  • 251
2 votes
1 answer
872 views

Shift+Ctrl+Tab not working in chrome with mapped Caps Lock key in Windows using SharpKeys

As suggested by this post, I used SharpKeys to map my Caps Lock key to Ctrl. A weird problem is that while other functions using this Caps Lock key as Ctrl works fine(like Caps Lock+Tab works fine in ...
user avatar
  • 1,328
2 votes
1 answer
2k views

In AHK, how can I create a new Chrome browser window and activate it

I would like to create a new Chrome window with the following AutoHotKey script: #c:: Run, "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--profile-directory=Default",,,PID ...
user avatar
  • 310
2 votes
1 answer
2k views

re-mapping media keys on a USB keyboard

Is it possible to re-map the media keys (volume, reload, etc) on a USB keyboard so that the order matches the one on my laptop? I want to re-map ONLY the ones on the USB keyboard. I've tried ...
user avatar
2 votes
1 answer
74 views

Open link at cursor position with keyboard shortcut

I'm using a rich web application that replaces my browser's right-click context menu with a menu of custom options. I want to be able to open a link in a new tab and right-click doesn't work for the ...
user avatar
  • 1,703
2 votes
0 answers
386 views

How to use Windows key in Autohotkey as part of a macro

I have been using autohotkey on a terminal with 122 keys. I remapped the keys so that their original funky uses are now much closer to normal modern computers. I also mapped a scancode to Windows ...
user avatar
2 votes
1 answer
1k views

AutoHotkey: While 2 keys are pressed = press 3rd key?

In AutoHotkey, how can I do the following: While Space and W are pressed down at the same time, send LShift every X milliseconds; do this until Space and W both are released. I'm a beginner; what I ...
user avatar
  • 21
2 votes
1 answer
368 views

Refining an AutoHotkey script

The purpose of this script is: The first two rows of hotkeys always effective. The remaining hotkeys work at NO TEXT INPUT Status only. In other words, when the small vertical lines are flashing ...
user avatar
  • 21
2 votes
1 answer
616 views

Autohotkey AppsKey does not work properly in Chrome

I try the following hotkey in Chrome: !F3::Send {AppsKey}{Up} Chrome opens the context menu but it doesn't move the selected line in the context menu. Instead the {Up} command moves the scroll bar ...
user avatar
  • 2,240
2 votes
2 answers
178 views

Detection of Objects on Remote VM, like start button, cmd prompt using hotkeys

I am able to take remote control of any virtual machine using AutoHotKey . I want to run ipconfig command on remote machine. It can be performed using mouse clicks, but I want to do it using keyboard ...
user avatar
  • 21
2 votes
2 answers
316 views

AHK macro automation software: GUI does not show

I remember in the past I have used AHK to do some repetitive task. I did it via some GUI; it recorded my mouse gestures and my keyboard strokes. I have downloaded it again but now I see no GUI, just ...
user avatar
  • 21
2 votes
1 answer
3k views

Difficulty with middle click - MS Wireless 6000 scroll wheel sensitivity

(Microsoft Windows) When I try to middle click on the scroll wheel, I usually just get a little bit of scrolling instead. I am using the Microsoft Wireless Laser Mouse 6000, which is very ...
user avatar
2 votes
2 answers
93 views

How to remap Enter as a right control modifier in Win 8.1?

I did this with keyRemap4macbook on OSX. Enter alone works as Enter but Enter+Key becomes Ctrl+Key. How do I do this in Windows?
user avatar
1 vote
0 answers
31 views

Rewriting the input change logic "Alt" + "Shift" (release) on Windows?

I am trying to implement this algorithm, and rewrite Windows input change logic : I tried this LAlt:: While GetKeyState("LAlt", "P") { Input, key, L1, % "{LControl}{...
user avatar
  • 119
1 vote
1 answer
229 views

NirCmd volume control of certain applications from Volume Mixer not working?

So I use this app to mute microphone communication in Valorant. But I also want to mute the game itself. The devs of the game have separated these 2 so in Volume Mixer (SndVol.exe) they are 2 ...
user avatar
  • 11
1 vote
0 answers
92 views

How to Pin to Bottom/Desktop UWP Application Using AHK Windows 10

I'm aware of using setParent from DLL in Windows and I can pin Win32 application on Windows already with this script #o:: Current := WinExist("A") ;ParentID := WinExist("ahk_exe ...
user avatar
1 vote
1 answer
58 views

How to force Windows to use %USERPROFILE% when creating multiple shortcuts simultaniously (or achieve the same thing with AHK)?

The problem: Using dropbox at my work, my colleagues can't follow shortcuts I create. PS: I use "shortcut" (what Windows calls them) and "alias" (the Mac nomenclature) ...
user avatar
  • 159
1 vote
1 answer
37 views

`alt + ctrl + <anyCharacter>` autohotkey mapping used in a jetbrain IDE goes goes through but then a a popup opens after pressing enter

This quesiton is similar to What is preventing ctrl-alt-m from reaching IntelliJ on Windows 10 . However, ctrl + alt + <anyKey> does go through to the jetbrain IDE, pressing any key after that ...
user avatar
1 vote
0 answers
671 views

Remapping mouse buttons to single-button hotkeys not usable on the keyboard

I have a Roccat Kone AIMO and I want to remap the buttons to buttons that are not on my keyboard, like the F13-F24 keys. I could theoretically do this via the "assign a hotkey" function in ...
user avatar
1 vote
1 answer
52 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 ...
user avatar
  • 11
1 vote
0 answers
104 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 ...
user avatar
1 vote
0 answers
76 views

AHK Window Control - Resize: What determines the +12px maximum window size past screen bounds, and can it be circumvented?

Exactly as the title says, my question is: what determines the +12px limit (past screen bounds) for maximum window sizing? And can this be circumvented to increase window size to any arbitrary size ...
user avatar
  • 690
1 vote
0 answers
105 views

AutoHotkey script stopped working after I downgraded to windows 7 from windows 10

An AutoHotkey script stopped working adter I downgraded to Windows 7 from Windows 10: Script is started via shortcut Ctrl+Shift+L Monitor wakes via ESC only, but doen't wake if I uncomment DllCall(&...
user avatar
  • 111
1 vote
0 answers
73 views

Why do Auto Hot Key scripts stop working at some places in my PC?

I looked up on the net for AHK scripts to get ripple effect around my mouse pointer when I clicked. But it stops working sometimes, like it doesn't work on overlay windows or in the start. Though not ...
user avatar

1
2 3 4 5
8