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
4
votes
2answers
4k views

AutoHotKey Run Windows Commands

Is there a way to run Windows command line commands in AutoHotKey without just opening a command prompt and sending the key presses? I want to run commands hidden in the background. For example ...
8
votes
2answers
5k views

Open Powershell as Administrator at Current File Explorer Directory Keyboard Shortcut (Windows 10)

Let's say that I'm browsing through Windows File Explorer, and suddenly I decide that I would like to open Powershell as administrator at the current directory (the directory that I'm at in File ...
0
votes
1answer
3k 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: ...
0
votes
0answers
69 views

How can I mass save a list of URLs to PDF?

I have a list of URLs for recipes that I want to save as PDFs before my subscription to the site runs out. A friend wrote an AutoHotKey script that will take the URLs and use the Print to PDF option ...
0
votes
0answers
24 views

AHK: Temporarily turning off a remapped key

I am trying to do something in these lines: NumpadEnter:: Alt !a:: Hotkey, NumpadEnter, Off return !a Up:: Hotkey, NumpadEnter, On return Essentially, block a remapped ...
0
votes
0answers
41 views

autohotkey: map a key to 2 different hotkeys + need 0 delay

I don't have any hotkeys free. And i need use alt for alt, while i need it when i press it to act like i pressed small l. But with autohotkey code sendinput {l down} {l up} it cause bug i can't ...
2
votes
0answers
23 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 ...
0
votes
1answer
2k views

Mouse Positioning using AutoHotKey

I am trying to create a script (pls be aware that I am not a programmer) using AutoHotkey that opens a web site, positions the mouse at a specified clickable icon and click repeatedly in a pre-...
0
votes
2answers
56 views

AHK first character is repeated for hot strings

::cl::call For this hotstring, after hibernation for cl gets ccall the first character is repeated in windows 10. ~^.::reload I added this hotstring to reload. AHK version: v1.1.30.03 - April 5, ...
0
votes
0answers
27 views

AutoHotkey - Remapping keys only if certain keys are being held down

In a specific 3D app I am trying to accomplish the following: only while I hold down RButton, if I press space I wish to remap space to MButton. Currently what I have so far (not really working atm)...
0
votes
1answer
43 views

Switch between windows on only one virtual desktop with Autohotkey - with alt+tab working as-is

I'm looking for a autohotkey function, system shortcut or dll call to cycle between all windows on the current virtual desktop. Windows 10 has this option (Pressing Alt+Tab shows windows that are ...
0
votes
1answer
38 views

How do I disable specific windows 10/Office Keyboard Shortcut (CTRL+SHIFT+WIN+ALT+D)

it seems that Office has decided to hi-jack the keyboard shortcut CTRL+ALT+SHIFT+WIN+D. That might not seem like a problem, but I have assigned that keyboard shortcut in AutoHotKey and have been ...
0
votes
1answer
3k views

how to control copy and paste from excel sheet using autohotkey?

I am copying and pasting some data from ms excel sheet to some other program using the following autohotkey script: f1:: loop 2000 { Send, {CTRLDOWN}c{CTRLUP} sleep 100 send {ALTDOWN}{TAB}{ALTUP} ...
0
votes
2answers
3k views

Windows key + Left/Right arrow combinations in AutoHotkey

I'm trying to make an AutoHotkey script that would run the following sequence once I press Win+Space: Win+E -- Open an Explorer window Win+Left Arrow -- Snap to left of screen Win+E -- Open an ...
0
votes
1answer
13 views

Execute something from the start menu using autohotkey

How do I start something from the windows start menu using autohotkey? I can do Send ^{Esc}MyAppName{Enter} And everything works except the last {Enter}. The screen stops on the open start menu ...
0
votes
1answer
34 views

AutoHotKey: Double press script from SetTimer malfunctioning

(Not sure how to edit the script for it to become readable on StackExchange) If a letter has modifiers and is being sent on this double press script from SetTimer on the manual (https://www....
1
vote
0answers
24 views

How to map NumPad1 to Alt+Enter?

I'm new to AutoHotKey, and I'm trying to map NumPad1 to Alt+Enter. I have done this by right clicking on the AHK window and editing script, which is in My Documents/Autohotkey.ahk and overwriting the ...
0
votes
0answers
10 views

Batch File or AutoHotKey for pre and post launch of applications Win 10

This is for an arcade cabinet. Im trying to create a script to launch a controller profile using xpadder, then start an emulator/game. Then once the game is closed, launch a 'blank controller' ...
2
votes
1answer
2k views

Simulate key combination

I have a keyboard with no break key. Is there a means (install software or otherwise) to send a break keypress event to a machine with no break key? I'm fine using AutoHotKey or something. ...
0
votes
1answer
34 views

AutoHotkey Keyboard Shortcuts Not Captured When Certain Programs Are Focused

I have a very simple AutoHotkey script that listens for certain key presses to run Windows Shortcut files (lnk): F21:: Run "C:\Users\djcim\Google Drive\Powershell Scripts\Admin Shortcuts\djcim\...
0
votes
1answer
55 views

How to Split Screen & Auto-size Programs on Vertical Monitor

My monitor is one a vertical orientation, so snapping windows to top and bottom is impossible. I am using Windows 10. I need help finding a way to: Auto start Google Chrome and Internet Explorer. ...
1
vote
0answers
17 views

AutoHotkey; using a modifier as a normal key and then as modifier

Novice on AHK here. Here are the lines: ^Alt:: Send, b ^!PGDN:: Send, r The "^!" part of the second line gets send continuously before PGDN is pressed, and I get something like "bbbr", so I have ...
1
vote
0answers
37 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 ...
0
votes
1answer
27 views

Multiple key presses for one key press hotkey

I really don't know to create this script. When I press "r" key I want both "r" and "w" to be pressed. Can anyone help me script this command?
1
vote
2answers
2k views

How to debug AHK, like printing out debug string to console?

I wanted to debug AHK code that calls python script and batch file. I inserted "print SOMETHING" in the python script, but it doesn't seem that the result is not shown to the console. Is there a ...
2
votes
1answer
4k views

How can I disable "Do you want to open or save this file?” prompt for .mp3 files in IE 11?

I am using IE11 for my AutoHotKey scripts.I want to disable “Do you want to open or save this file?” download prompt. I tried following things. 1-)Find the correct registry value for.mp3 C:\Users\q&...
-1
votes
1answer
54 views

Combining and improving 2 ahk scripts into 1

I've created a script by editing from those scripts I found around about gaming. I'm not even sure if it's 100% effective, but somehow I kind of know what I want. Is it possible to combine the below ...
3
votes
1answer
10k views

How can I define a variable and then use it in multiple hotkeys?

Example #Persistent fileName = H:\Data\Desktop\myfile.txt return ^#Left:: FileDelete, %fileName% return ^#Right:: FileDelete, %fileName% FileAppend, %clipboard%, %fileName% return Right now it ...
2
votes
2answers
3k views

How to disable autohotkeys for specific programs

I have some autohotkey settings for my joystick that are set to work everywhere. However, there are two programs in which I don't want the joystick remapped. How can I modify my script to prevent ...
0
votes
0answers
55 views

winactive or run in virtual desktop autohotkey

i work with virtual desktop whit multiples intances of google chrome in diferente virtual desktop I normaly use this for active or run google chrome . ^ñ:: SetTitleMatchMode, 2 ; approximate match ...
4
votes
2answers
1k views

Hacker Typer style application for Windows [closed]

I need to do a bunch of screencasts that demonstrate some programming techniques. I already know what I'm going to type for each of them, and I'd like to minimize all the delays and awkwardness from ...
0
votes
1answer
52 views

AutoHotKey: How do I set the starting value of the current loop iteration?

I've made a basic AHK script that adds unique metadata to each file on a system I use every day. The idea is to add _01 to the first file followed by _02 to the second file and going up forever until ...
1
vote
2answers
71 views

+ / - keys on non-US keyboards

Many shortcuts require to use the + or - keys. Example : zoom or dezoom with Chrome : CTRL + or -. some websites (such as this one) use + or - keys to do certain actions (I have a laptop with no ...
0
votes
0answers
18 views

Can't find CLSID for an application

I wan to use an AHK script with a specific version of Photoshop (CC2018, I have several installed) set via ComObjActive("{CLSID}"). The problem is I can't find an ID associated with this version. When ...
2
votes
1answer
2k views

Create and toggle Windows Firewall rule

Using a single batch, PowerShell or AHK script, how can I: (if it does not exist) create a Windows Firewall rule that blocks a program; and disables or enables the rule depending on what its current ...
8
votes
1answer
784 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, ...
0
votes
0answers
16 views

Which messages are sent when restoring program from taskbar? (Windows 10)

Have a problem with certain program which would only correctly minimize or maximize by clicking on his taskbar icon any other way would result in unsatisfactory result i.e using autohotkey can't work ...
2
votes
2answers
4k views

How can I return focus to the previous window?

I have an Autohotkey script which opens and closes a pop-out command line similar to the Quake console dropdown. When I close it, however, it places focus on the taskbar. How can I instead return ...
0
votes
3answers
924 views

Create a text file with a keyboard shortcut in Windows Explorer

I'm using the solution from How to create a new text document (TXT) file by a Hotkey? since a few years, with Autohotkey, and it allows to create a new text file anywhere in the Windows explorer with ...
0
votes
2answers
1k views

AUTOHOTKEY | WinMove | Virtual Desktop of choice

UPDATED-STATEMENT: 20181118@205016@SUN A suggestion was made to manually focus the Virtual Desktop of my choice, but this eliminates me from doing other tasks on another Virtual Desktop. Still waiting ...
0
votes
0answers
19 views

AHK native button function is not blocked where it should be

I would like to use right-mouse-button combos while preserving the native behavior of the button: *RButton::Send {RButton down} ; 1-simluate original behavior of RButton *RButton UP::Send {...
0
votes
0answers
23 views

What is wrong with my script in AutoHotKey? WITH VIDEO DEMO

Video: https://youtu.be/zbMQ6BOP6_E Let me explain my scenario. I'm holding down the 1 key producing a string of 1's. When I right or left click my mouse, the string of 1's stop briefly before ...
0
votes
1answer
35 views

How do I remap the mouse clicks so that a previously held down key carries on sending inputs once I release the remapped key?

Let me explain my scenario. I'm holding down the 1 key producing a string of 1's. When I right or left click my mouse, the string of 1's stop briefly before resuming once again to produce a string of ...
1
vote
3answers
458 views

How to bind F13-F24 keys to the 12 side buttons on Razer Naga?

I'm trying to use the Razer Synapse configuration app to bind the 12 number buttons send extra F keys from the 13..24 range, but I'm not having any progress. When I'm in the right menu, I can press F1 ...
1
vote
1answer
139 views

How do write a toggleable hold down key in AHK?

I'm trying to write an AHK script that allows me to do the following: Press the t key to toggle the 1 key being held down so that it types a bunch of 1's indefinitely until I press the t key again. ...
0
votes
0answers
25 views

Autohotkey: Remapping left and right mouse clicks while a key is being held down stop the held key from being held down

Let me explain my scenario. I'm holding down the 1 key producing a string of 1's. When I right or left click my mouse, the string of 1's stop briefly before resuming once again to produce a string of ...
4
votes
5answers
4k views

How do I send a keyboard layout switch event with autohotkey in Windows 7?

I want to remap the keyboard layout/language switching to Win+Space, I tried it with: LWin & Space::Send, ^+ But it doesn't seem to work, I would want it to send a Ctrl+Shift sequence so ...
6
votes
6answers
4k 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
0answers
33 views

AutoHotkey - How to send a key that is not part of the current keyboard layout

I use a program that uses \ as a shortcut. I use a French AZERTY keyboard, where the backslash can only be typed using a key combination: Alt Gr+8 (or Ctrl+Alt+8). So I cannot activate the shortcut (...
4
votes
2answers
1k views

Displaying a custom animation at the click location on Windows 10 in response to an event

There are plenty of programs regarding the alternation of the cursor appearance, especially for the Mac OS in which one can change the look of the cursor, on for example mouse events, with beautiful ...