Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

AHK : How do I determine if the active window does not match any of the titles in a list?

I got this AHK script made by Shenk from here assign different border to different windows?. It is designed to draws border around active window : ; ====================================================...
yfjuu 6's user avatar
  • 25
0 votes
1 answer
46 views

AutoHotKey 2.0 Error: Warning: This local variable appears to never be assigned a value

This is my first time writing an AHK script for my new split keyboard. I'm familiar with coding but not specifically with AHK syntax. Here's the relevant part of the script: ; Left Space (SC039) is ...
Sunny's user avatar
  • 1
0 votes
0 answers
25 views

Why the second layer is not working with GetKeyState?

My AHK script has the following part: #If GetKeyState("RAlt", "P") ; When Right Alt is pressed i::Up j::Left k::Down l::Right #If ; Ends the block However, ...
excitedGoose's user avatar
0 votes
1 answer
35 views

Toggle maximize window with autohotkey

How can I make a script to toggle between Maximize/Restore for the current (active) window in autohotkey? e.g. like this, but toggle: #x::WinMaximize, A
sashoalm's user avatar
  • 79.1k
1 vote
0 answers
28 views

Auto Key presser for a specific window

the script seems to be not working #Requires AutoHotkey v2.0 #SingleInstance Force running := 0 F3:: { global running if (running = 0) { running := 1 SetTimer(SpamKey, 50) ; ...
Backup Up's user avatar
0 votes
0 answers
42 views

failing to port a simple function to AHK2

I have a simple print function that I use in AHK1 to simply print strings, ints or objects to debug console (VsCode). I have tried to port it to AHK2: out(["one", "two"]) ;...
Ralf_Reddings's user avatar
1 vote
0 answers
26 views

How to use AutoHotkey to make mouse wheel click reliably open the "Open with" Windows File Explorer context menu?

I frequently use a multitude of programs to open the same file. For example, I often open .txt and .py files with Notepad, Notepad++, and Visual Studio Code. Another example is that I like opening PDF ...
CuriosityCalls's user avatar
-2 votes
2 answers
49 views

Why would Send rearrange string?

My code: #Requires AutoHotkey v2.0+ TextToSend := FileRead("textToSend.txt") lines := StrSplit(TextToSend, "\n") :*:st::{ Loop { SetKeyDelay 10000 ...
Ooker's user avatar
  • 2,874
0 votes
2 answers
40 views

Pressing another key interrupts timer/script when waiting for certain key pressed conditions

I'm a noob, so this might look ugly and could probably be improved. The script below does the following: When capslock is activated and Spacebar is pressed down Submit a space every 10ms This works ...
user0000001's user avatar
  • 2,203
0 votes
0 answers
31 views

AutoHotKey V2: Issuing HTTP request on PBT_APMSUSPEND event sometimes fails. Windows doesn't give enough time to do anything before sleeping

I'm trying to automate turning off my miniDSP Flex when I put my computer into sleep mode (or hibernate), if miniDSP is currently turned on. The script below sends an HTTP request to a learning remote ...
user2129038's user avatar
-1 votes
1 answer
38 views

Firestore JSON parsing terminated [closed]

I tried many ways to fix it , but i couldn't . JSON : jsonData := '{"select": {"fields": [{"fieldPath": "name1"}]}, "from": [{"collectionId":...
Ahmed Alsmairy's user avatar
1 vote
1 answer
36 views

Ctrl-Backslash to send an ASCII character

This works (Ctrl-Backslash key sends the text in question): ^VKDC::Send("BlahBlah") This also works (Keys hit sequentially "/q" emits the ASCII char 168 namely upside down ...
Shaun Louw's user avatar
-1 votes
2 answers
42 views

AHKv2 Unable to offset excel value with ComObjGet - 'Error: This value of type "String" has no method named "Offset".'

AUTOHOTKEY v2.0.18 I have 2 codes. One works flawlessly and the other, which is almost exactly the same, does not. Can you identify where I'm going wrong here please? WORKING - TEST CODE TO GET IT TO ...
itz_reecey's user avatar
0 votes
0 answers
46 views

Communication between AutoHotkey and Chrome Script (Tampermonkey/Greasemonkey)?

I've created a custom Tampermonkey script to control all videos in the current active Chrome Tab back/pause/forward/playback rates. Now I'm trying to also use them from my Streamdeck while in a game ...
FlexXx's user avatar
  • 81
0 votes
1 answer
29 views

remap the AltGr+; combination to dollar sign $

I want to use the AltGr+; combination to produce the dollar sign using AutoHotKey v2.0. Unfortunately I cannot seem to get it to work after several failed tries. My keyboard has the actual AltGr key ...
Mark's user avatar
  • 1
0 votes
0 answers
11 views

Lua Macros Second keyboard not disabled

I recently created script in Lua Macros. It is supposed to disable second keyboard but it does not which in some programs result in shortcuts not working properly. This is the code. ...
Marián Jenis's user avatar
1 vote
1 answer
37 views

Running 2 Macros with One Key combination

I'm trying to run 2 macros with one key combination. In my example, ctrl s. I've been trying but getting nowhere:( I'm creating the .ahk file with Pullover's Macro. In my example, I'm having to use 2 ...
Strat919's user avatar
0 votes
0 answers
48 views

Steam Non-Game App - How To Find/Calculate The Shortcut ID

I've recently embarked on a project whereby I create a quick-firing XMB-style web-launcher for my PC, PS1, PS2 and Xbox 360 games via the corresponding method/emulator. To do this I use AHK to handle ...
PriceyUK's user avatar
  • 2,017
0 votes
0 answers
50 views

AHKV1: How to get the first 'keyWait' to stop holding up the programme?

I have a situation where while I hold down the space key, if a key is pressed, carry out an additional action and then, upon releasing space key, do the default action. I have come up with the ...
Ralf_Reddings's user avatar
-3 votes
2 answers
47 views

Can't get FFMPEG works in autohotkey

I read the documentation of Run from which I tried this example, but I retrieve nothing in the message box : command := """C:\Users\julien\OneDrive\Portable Softwares\FFMpeg\bin\ffmpeg....
user1683620's user avatar
1 vote
1 answer
51 views

Alternative to capslock in scripts

I have been using Autohotkey and many triggers involving the Capslock key on my laptop for a long time. I am also using Synergy v1 from Symless to share mouse and keyboard from my desktop computer ...
Sandro's user avatar
  • 463
0 votes
1 answer
47 views

Referencing the semicolon key in script

I have the folowing code that works on AutoHotKey v1 AppsKey & `;::Send {Blind}{Right DownTemp} AppsKey & `; up::Send {Blind}{Right Up} However, this line causes trouble in AutoHotKey v2. How ...
stevep's user avatar
  • 199
0 votes
1 answer
29 views

How do I access the second (or Nth) entry that matches the script's criteria?

There is a script #IfWinActive, ahk_class illustrator RWin::Send, !frf The menu commands looks like this ... exportDocs fitAndCenter fitSelection fitAndScale ... Cuurently the script selects ...
rozerro's user avatar
  • 7,068
0 votes
0 answers
12 views

Mapping the right touchpad key for working as a left touchpad key by AutoHotKey

I'm trying to make my windows notebook touchpad working as on Mac. I want both side clicks works as left-click with one finger and right-click with two fingers. Windows has an option "Tap with ...
tse's user avatar
  • 6,069
0 votes
0 answers
68 views

AHK v2 script toggles caps lock off and then on when GetKeyState("CapsLock", "T") returns 1

I am writing a script to make the AltGr (Right Alt) key apply some custom diacritics to certain letters. For each of these letters, I have two rules. <^>!g:: { if GetKeyState("CapsLock&...
DagdA's user avatar
  • 486
0 votes
1 answer
28 views

Creating a function to disable / enable the key list

I want to create a function to disable/enable the key list, but I do not know in what form to record the keyboard shortcut and how to use them. toggleKeys() { myKeys := ["h", "j&...
nikitation's user avatar
-1 votes
1 answer
66 views

autohotkey v2 window maximize/minimize toggle hotkey failing

Why is this code randomly failing? It will work consistently and then freezup(either with the window maximized or minimized) at some seemingly random time, requiring me to select 'any window' in order ...
Koko3433's user avatar
0 votes
0 answers
51 views

How to get/retrieve the values of a specific field of a webpage loaded in Internet Explorer mode in Edge browser?

I am trying to retrieve the value of a specific field of a webpage which is loaded in Internet Explorer within Edge Browser. I am trying to use Edge_GetIE function for this purpose. iWB2 Learner tool ...
user433939's user avatar
0 votes
1 answer
41 views

Delete locked file using AutoHotKey

I'm trying to delete a locked file using AutoHotKey v1/v2 without the use of any 3rd party software. The file is created and locked by another process which I don't want to terminate. When I try to ...
Darts's user avatar
  • 11
0 votes
0 answers
23 views

How to get the correctly formatted value from a Hotkey Box in AutoHotkey v2

I'm using AutoHotkey v2 to create a GUI where the user can select a hotkey using a Hotkey Box. However, I'm facing an issue when trying to capture the hotkey value in the desired format. Currently, ...
Collaxd's user avatar
  • 569
0 votes
2 answers
74 views

How do I make a GUI which asks the user how many loops the script should do in AutoHotkey V2

I want to make a Program which asks the user how many times the inner loop should loop. It should also ask only once and then run indefinitely with the number of loops the user set. Here is the code: ...
Maximilian Wonschik's user avatar
0 votes
1 answer
15 views

Autohotkey how to map shift + character

Here is my script 5::( ; work: when press 5 turn into "(" %::5 ; not work: when press % (shift 5) I want it turn into "5" but it turn into "%" How to fix the line 2? ...
WestMountain's user avatar
0 votes
1 answer
57 views

How do MsgBoxes and GUIs work in autohotkey v2

ok so I have this code #Requires AutoHotkey v2.0 global MyGui := "" global uNID := "", Password := "" global EditUsername := "", EditPassword := "" ...
Lucas Hicken's user avatar
0 votes
0 answers
54 views

I have a problem with an AHK v2 script for automating resetting runs in TBOI:Afterbirth+

Ok, so I have been trying to make a program to automate runs in Isaac. I am a begginer in AHK but not in other languages so I thought I'd give it a try with the help of ChatGPT. The thing is that I ...
Arturo Celorrio's user avatar
0 votes
0 answers
54 views

How do I change the Value of a Combobox I didn't create without getting a critical Error: (0x80131509) in AutoHotkey V2 using UIA2?

I want to make a Program which can export STEP-Files into STL-Files. (I'm pretty new to AutoHotkey V2 (AutoHotkey in general).) For this, I'm using UIA2 from Descolada. I need to change the value of a ...
Maximilian Wonschik's user avatar
0 votes
2 answers
93 views

Concatenating custom strings works, but unstably

I want to build concatenated strings in AHK v. 1.1 from seperate strings that I select consecutively with my mouse by pressing (down) Caps lock + y each time. When I'm done selecting all text snippets,...
Pingui's user avatar
  • 1,486
0 votes
2 answers
214 views

Ahk v2 current Unix Timestamp

I'm trying to get the current timestamp, which is the number of seconds past from 01/01/1970. But it seems like there isn't a function like that in ahk like some languages do. I tried to do research ...
Brawldude2's user avatar
0 votes
1 answer
55 views

Auto Hot Key stopped working after modifying a script

I need to remap certain keys so that CapsLock + "ijkl" would result in arrow keys without actually toggling CapsLock on. Standard practice. ChatGPT gave me the following code which worked as ...
Roman's user avatar
  • 3
0 votes
1 answer
35 views

auto hot key v2: block of code does not execute when holding shift key

this is actually a script for my little game.. when player is running (you need hold the shift to run faster/sprint) and if you do so the script does not work...you have to release the key and then ...
user24974510's user avatar
1 vote
1 answer
75 views

How can I replace my tab key with AutoHotkey?

My keyboard broke, and some keys are not working. To overcome this situation, I wrote a simple script that makes the letter 'q' act as 'Tab' when I hold down 'Shift': +q::Send "{Tab}" The ...
Salva_Karaka's user avatar
0 votes
1 answer
77 views

Autohotkey V2 - Date Hotstring Auto-replace

Desired outcome: Type "cdt" -> Autofills date and time in this format: "Saturday 11:18 AM - Aug 03, 2024" Current Script: ::cdt:: { Send FormatTime, ("A_DDD, HH:mm, - A_MMM ...
its.meeeetch's user avatar
0 votes
1 answer
38 views

Why is my autohotkey script with a loop and if statement does not work?

I've been trying to make a script where at specific minutes every hours, something happen. I've tried to add a loop so it can always check if it is now at the right minute of the hour. I tested the ...
Lxr sed's user avatar
0 votes
2 answers
244 views

Unable to empty clipboard in AutoHotKey v2.0.18

So, I was trying to update a script using the Clipboard of Windows 11. The script was nothing much; just a hotstring. It inserts a string of characters, with the SendText command. However, I decided ...
RndCoder's user avatar
  • 333
0 votes
2 answers
60 views

Reassign a keyboard shortcut, but also disable the original shortcut: Autohotkey script not working consistently

In Windows 10, I use the Dvorak keyboard layout. That means common keyboard shortcuts are in different places than usual, e.g. ctrl+v and ctrl+w are right next to each other, and x/c/v are not ...
GG2's user avatar
  • 181
0 votes
1 answer
40 views

Is it possible to make an AHK script that takes a spacebar hold and make it a tap?

How can I make it so when I hold the spacebar it acts like one normal press? Here is my code: #InputLevel, 10 ;set send level for the following code to 10 $Space:: #InputLevel ;set it back to ...
16BitDoggo's user avatar
0 votes
1 answer
78 views

AHK Multiple clocks showing time from different time zones

Good day, I'm trying to create a script for AutoHotKey (AHK) which would show in a GUI multiple digital clocks (with different time zones). I already created a simple script with 3 different clocks ...
Neelfinity's user avatar
3 votes
0 answers
2k views

Implementing SnapTap Feature Using AutoHotInterception in AHK

I'm trying to replicate a feature called "Snap Tap" found in Razer keyboards, which is similar to the Null Movement/Null Bind function. I found an existing AutoHotkey (likely AHK v1) script ...
vini_seboldp's user avatar
0 votes
1 answer
39 views

How to pass function argument to Send?

How do I pass a function argument to Send? I am thinking of something like: Interact(controlName, activationTime) { Sleep 100 ; Small pause Send {controlName Down} ...
Razzupaltuff's user avatar
  • 2,279
0 votes
1 answer
284 views

AutoHotkey V2 - Click/focus input field and type in open chrome browser

Being new to AHK v2, we asked claude ai to generate some code, as it appears to be trained on AHK V2 based on some AHK expert videos released a couple of weeks ago. We're basically trying to click on ...
Wonka's user avatar
  • 8,644
0 votes
1 answer
136 views

Notify about Pending Messages in Microsoft Teams

How can I create a pop-up to tell me if I have unread messages in MS Teams? I sometimes miss the brief MS Teams message banners for hours, even while working at the computer. I don't know if it is a ...
deasserted's user avatar

1
2 3 4 5
95