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
0 answers
10 views

AHK Win key weirdness: sends 'Ctrl' at random or allows the rebound keys to still activate

The following script allows Win+X and Win+Z to be used for scrolling, and disables the Windows key bringing the Start menu up, as suggested in the documentation: #z:: Send {WheelDown 1} ...
Steve's user avatar
  • 217
0 votes
0 answers
10 views

AutoHotkey_v2: Find file with name and ext in all drives

It's hard to find a way to searching for a file in my PC with a given name and ext in AutoHotkey v2. Many examples for v1. After some time and searches, I build this Func I leave here for others. I ...
Emanuele Tinari's user avatar
-2 votes
1 answer
60 views

AUTOT - Stop loop

i have code one mini app. I want ask to exit or not from a while. But all after while not working. I share all code : Global $test $choice = GUICreate("Custom MsgBox", 225, 80) ...
Cress's user avatar
  • 7
1 vote
2 answers
69 views

"Press any key to exit" command prompt?

^!a:: hwnd := WinExist("A") for Window in ComObjCreate("Shell.Application").Windows if (window.hwnd==hwnd) { Selection := Window.Document....
medukia's user avatar
  • 39
1 vote
2 answers
47 views

(AHK) shortening this autohotkey script, possible?

^+a:: soundset +8 soundget vol tooltip % "volume = " round(vol), 1900, 1000 settimer, removetooltip1, -3000 return removetooltip1: tooltip return ^+s:: soundset -8 soundget vol tooltip % &...
medukia's user avatar
  • 39
0 votes
0 answers
20 views

AutoHotkey / Python Windows POST message

i have set autohotkey to send a ControlMessage to a background windwow, it works as intended and clicks the area successfully. I simulated the function in python and Spy++ says the EXACT same message ...
cap2020's user avatar
0 votes
1 answer
38 views

Open folder in vscode using autohotkey

I want to open a specific folder with VScode when I press a button. Can I bind this to a script with autohotkey? I'm using autohotkey V1
Sem's user avatar
  • 3
0 votes
1 answer
28 views

AHK GUI IF statement needed

Created an AHK Calculator GUI that when you select copy it will copy all information to paste. I would like to edit the script to not copy a section if that section is blank. GUI is set up for 3 ...
CuppaJoe's user avatar
-1 votes
0 answers
19 views

How to create a hotkey using python irrespective of the operating system

I want to create a hotkey using python irrespective of the operating system. another way to create a hotkey by any means irrespective of the OS is appreciated I tried adding a hotkey using keyboard ...
Vedant Arora's user avatar
0 votes
0 answers
16 views

need converting from V1 to V2 AHK?

I've just converted my V1 script to V2. This script is supposed to execute some code after launch a specific program : ; ================================================================= ; V1 SetTimer ...
yfjuu 6's user avatar
  • 25
0 votes
1 answer
25 views

Hotkey problem with (AltGr) (<^>!) (LCtrl & RAlt)?

I want while holding down "AltGr " then(and) "SC033" it stills doing undo, undo, undo ... until release "SC033". as for <^>!p the same thing for <^>!SC033 ...
yfjuu 6's user avatar
  • 25
0 votes
2 answers
40 views

Can't send the space key

I'm trying to fix double-typing on my keyboard. For this I want to use an AutoHotkey (2) script like this: SendMode "Input" #SingleInstance *g:: { Send "{g}" Sleep 50 } ...
TryingToLearn's user avatar
0 votes
0 answers
19 views

This value of type "ComObject" has no property named "__Item". when upgrade to v2 using autohotkey

JSONParse this work for me in v1 when i upgrade it to v2 JSON_parse(jsonStr) { SC := ComObject("ScriptControl") SC.Language := "JScript" jsCode := ( "...
Carl's user avatar
  • 1
0 votes
1 answer
43 views

AutoHotKey: AltR + AltL + u does not work (but it works with a)

Does anyone have a guess why the following AutoHotKey-Script is not working? Everything but the last 2 lines work perfectly fine but when I press AltR + AltL + u nothing happens. !a::ä !u::ü !o::ö !s::...
Celestial Dragon's user avatar
0 votes
1 answer
39 views

How to detect when a running script is modified and reload?

I have an AutoHotkey file running on a Google Drive folder on a remote machine and i'm trying to make it reload itself whenever it detect it got modified. Is there a method to subscribe to file ...
Simon's user avatar
  • 1
1 vote
0 answers
31 views

How to call a dll function?

Consider a custom DLL named MyDll.dll that includes a function MyFunction. This function is declared in C++ as follows: extern "C" __declspec(dllexport) int MyFunction(int a, int b); I'm ...
Oliver's user avatar
  • 19
0 votes
1 answer
35 views

How to perform a different action according to the time since hotkey has been pressed?

How can I create an AutoHotkey script that when i press a specific hotkey it perform an action and when i press the same hotkey again if the time since the previous hotkey be < 1 sec, perform a ...
Jane's user avatar
  • 21
0 votes
0 answers
36 views

How to run an SAP GUI script from AHK

Created a script in SAP and can run it via a macro in excel. This is the code that runs it in Excel Macro. Shell "WScript ""C:\FVFR\Script2.vbs""" This is the actual ...
CuppaJoe's user avatar
0 votes
0 answers
31 views

Autohotkey: How to monitor changes on a minimized window?

I'm using Anki for some of my chemistry classes and due to the way I have set it up, there are always cards that show up a while later after I have finished a normal study session. Usually I remember ...
Hawkeye665's user avatar
0 votes
1 answer
29 views

How to reformulating a formula to another in AHK?

#If WinActive("Program Manager ahk_class Progman") ~LButton:: CoordMode, Mouse, screen MouseGetPos, x,y if (x > 100 and x < 200 and y > 300 and y < 400){ SoundBeep, 1000 } #...
yfjuu 6's user avatar
  • 25
-1 votes
0 answers
51 views

How to use "open with.." using .bat file?

There is a folder I would like to open with Honeyview using command and it's not working. Currently I'm doing this: echo off start "Location of honeyview" "folder location". ...
Divyanshu Bhujbal's user avatar
0 votes
0 answers
47 views

AutoHotKey v1 Send Each Keystroke to Multiple Chrome Tabs

I have the following script which is meant to immediately forward any key that the user presses to all Chrome tabs (focused or unfocused) which have the webpage title matching tabTitleA and tabTitleB. ...
gnorman's user avatar
  • 163
0 votes
2 answers
40 views

Square key is not working anymore in Autohotkey

I have been using these hotkeys for a while now ² & WheelDown::AltTab ;; <-- AltTab with mouse ² & WheelUp::ShiftAltTab ;; <-- AltTab with mouse Since last monday it is ...
user1683620's user avatar
0 votes
0 answers
27 views

Move files/folder from multiple source into one target path using windows shell script in autohotkey

Background: I want to write an ahk script to extract content of selected folder to the parent level. The first technical problem is solved (kind of): how to pass multiple arguments to script instead ...
Byzod's user avatar
  • 466
1 vote
0 answers
28 views

How to collect arguments from multiple instances of autohotkey script and pass it to handler script?

The actual thing I did and want to do: I have a autohotkey script 1.ahk that do something with directory, something like: #Requires Autohotkey v2.0 if(A_Args.length > 0){ srcFolderPath := ...
Byzod's user avatar
  • 466
0 votes
1 answer
48 views

AHK variable folder path dependent on radio button choice

Good day, I'm trying to create a script for AutoHotKey (AHK). The script itself already works fine: a small GUI with two radio buttons for each color (black or white), but I want to have a single ...
Neelfinity's user avatar
0 votes
1 answer
47 views

AHK prevent radio button from executing action

Good day, I'm trying to create a script for AutoHotKey (AHK). The script itself already works fine, but my issue is, that in the GUI when I press a radio button or checkbox ('Color' and 'Option' ...
Neelfinity's user avatar
1 vote
2 answers
62 views

Clear all Windows 11 notifications with a short-cut key

I would like to have a short-cut key to clear all Windows 11 notifications using Autohotkey v2. This question was asked before but the answer given was for Autohotkey V1.
user3848207's user avatar
  • 3,959
0 votes
0 answers
27 views

Python COM client communicating with Autohotkey COM server

I'm trying to control autohotkey script from python script using COM. I discovered COM today so I'm still little confused. My current code works without no errors, but I don't get any result. When I ...
ZawaXXD's user avatar
0 votes
1 answer
39 views

Access VBA public variables from outside the Office application

I have Outlook VBA code that sets a public variable and am trying to access that value externally via Outlook's COM interface. Is that possible? Specifically, I'm using the ComObjActive function in ...
Adam J. Kessel's user avatar
0 votes
1 answer
26 views

How can I make options apply to a GUI in AHK?

I'm trying to make a simple script that shows and hides a small GUI over the "close" button on a window (in the top right of the screen). For some reason, the GUI is not applying any of the ...
Speedy's user avatar
  • 23
-1 votes
1 answer
26 views

Build a string with literals and variables

I am trying to build a string for a tool tip, but no matter how I try to build it, I get an error. This is how I thought I could do it tooltipMsg := "Last: " + %lastEmbedState%`n"Curr: ...
Tyler N's user avatar
  • 301
0 votes
2 answers
53 views

Loop through ALL regex capture groups in AHK

I have a Match Object capture group setup in a regexmatch. I am taking a comma-separated list of items and trying to convert it into an array. So my plan was to find the total matches and just loop ...
wetin's user avatar
  • 390
3 votes
3 answers
144 views

AHK script doesn't replicate what manual keystrokes do

When I perform the following keystrokes manually: Ctrl+Alt+Home followed immediately by Alt+Tab ...it does exactly what I want: inside my RDP session, it minimizes my RDP session and lands me back on ...
HerrimanCoder's user avatar
0 votes
2 answers
56 views

How do i add a minimize, expand and cross icon to my autohotkey script just like you see in the web browsers on the top right

I've been working on a piece of code for a Valorant triggerbot, which activates when it detects an enemy on the screen based on their color and i wanted to add a minimize, cross and expand icon to it. ...
ScremerMemer's user avatar
0 votes
0 answers
24 views

How to automate Internet Explorer in Window 10?

I am trying to set values and retrieve values from the webpages of internet explorer in windows 10 using these codes- WinGet, hWnd, ID, A oWB := WBGet("ahk_id " hWnd) oWB.document.all(55)....
user433939's user avatar
0 votes
1 answer
61 views

How can I use "name" from wmctrl?

When I do "wmctrl -l" from WSL2, I get wmctrl.exe -l ID: Name: Title: ------------------------------------------------- 13028 WindowsTerminal C:\WINDOWS\system32\wmctrl.exe ...
Jason Hunter's user avatar
0 votes
0 answers
21 views

Restrict outlook calendar items to date range with AHK

I am trying to filter (restrict) Outlook calendar items to a specific date (today). I am very close, but I'm failing to correctly use the Items.Restrict("[Start] >= xxxx AND [End] <= xxxx&...
wetin's user avatar
  • 390
-1 votes
1 answer
64 views

How to send variables from a running python script to a running AHK script?

I have seen some questions and answers about running a python script with arguments from AHK, what I'm trying to do is kinda the opposite. One solution would be to set values for the clipboard inside ...
John Keyberg's user avatar
0 votes
1 answer
39 views

Check that two buffers are equal

I would like to check if two binary files have the same content. They are loaded in Buffers and I haven't found a method to check that two Buffers are equal. I came with this solution using NumGet ...
Greg's user avatar
  • 830
0 votes
1 answer
37 views

Windows 10 Create Hotkey and Bind to Short Audio File

My father just got a new keyboard for his computer that is meant to look like an old typewriter keyboard. It certainly looks great, but I'd like to be able to use it to trigger the old "ding"...
barabaskid's user avatar
0 votes
1 answer
90 views

How can I put a ternary operator in the GuiControl command in AHK?

I'm trying to make a form screen that resets all of the fields when the "Add" or "Edit" buttons are clicked. Whenever the function is run, I want to get the row value of the ...
Speedy's user avatar
  • 23
0 votes
1 answer
50 views

I cant figure out how to use this function

I have been using Polyethene's Command Functions library which is supposed to act as a replacement for allot of commands, The AutoHotkey docs recommends the library HERE. I have made use of it allot ...
Ralf_Reddings's user avatar
0 votes
1 answer
35 views

DllCall() - I keep getting ErrorLevel '-4'

I am learning how to make DLL calls in AHK V1 and I have covered some distance and understand a great deal, mostly thanks to this excellent article DllCall and structs tutorial by jeeswg but I am at a ...
Ralf_Reddings's user avatar
0 votes
1 answer
70 views

AutoHotkey `Ctrl+` combination hiding `Ctrl+Alt+` combination from other app

On Windows 10 I'm using AutoHotkey 2. Let's say that in Firefox I want to map Ctrl+F (for "Find") to the Ctrl+E combination, to select the Firefox search bar. It looks like this: #HotIf ...
Garret Wilson's user avatar
0 votes
1 answer
70 views

how to make an AutoHotkey script wait for a GUI to completely load

I am trying to load a program via AutoHotkey script so I can identify the existance of an element on the loaded GUI. It normally takes about 15 seconds for everything on the scree to load completely ...
Mike's user avatar
  • 65
0 votes
0 answers
20 views

Many web pages are blank - loaded by Javascript which doesn't run? - only when GUI automation script AutoHotkey types the URL

I'm trying to script GUI automation (Tampermonkey, AutoHotkey, etc.) to interact with web pages, but often my script will type in a website in the URL, and then Firefox seems to connect to the web ...
kwantum's user avatar
  • 59
0 votes
0 answers
26 views

Understanding Example #3 of FileOpen() from the documentation page

With the FileAppend command, its as simple as calling a compiled .ahk file from a terminal window, to get back an output from the script. For example: ;@Ahk2Exe-ConsoleApp FileAppend, Hello World! , * ...
Ralf_Reddings's user avatar
0 votes
1 answer
28 views

AHK Gui is not updating the tab width

I have a gui with 3 tabs. I just want the inner tab rectangle to be slightly smaller than the GUI itself but its way smaller (see image). The desired size would be as large as the red rectangle I have ...
wetin's user avatar
  • 390
3 votes
1 answer
89 views

How to get the width and height of the active monitor?

#singleinstance, force #Warn, All, OutputDebug space:: Gui HUD:New, +AlwaysOnTop +ToolWindow -Caption +HwndMainHwnd, hudWin Gui HUD:Font,s14,Consolas Gui, Add, Text,,% Clipboard GuiControlGet, ...
Ralf_Reddings's user avatar

1
2 3 4 5
93