311 questions
7
votes
4
answers
18k
views
How to add administrator privileges to AutoHotkey script?
I compiled it to an executable, but to open it I have to right-click and press "Run as administrator". I want it to request admin privileges each time I run it, but how to do it?
I can't do this:
...
7
votes
1
answer
5k
views
When to use % or %variable% in AutoHotKey?
I have searched around quite a bit and have failed to find an answer. In AutoHotKey, I am not sure the difference when a single percent is used near the beginning of a line, and when a variable is ...
0
votes
1
answer
2k
views
How to stop the current script?
I have this current script but it won't pause, even though i put a Pause script at F8 is there a way to stop the current loop?
F7::
Loop{
Send {1} ; Pressed 1
Send {-}
Send {-}
Send {-}
Send {-}
Send ...
17
votes
8
answers
16k
views
How do I wait for Google Chrome to load a webpage before continuing in AutoHotkey?
I am working on a AutoHotkey script that does a repetitive job in Google Chrome. Every time that I click a link from the script, I have to tell my script to sleep while the page loads.
I am ...
0
votes
1
answer
237
views
How can my AutoHotKey script launch batch scripts accordingly?
This script is supposed to switch me from Windows to Linux(VM) and vice versa:
Pause::vmStart()
return
runVM := false
linux := false
vmStart()
{
If (!runVM and !linux) {
Run, C:\Users\...
30
votes
3
answers
23k
views
Detect a double key press in AutoHotkey
I'd like to trigger an event in AutoHotkey when the user double "presses" the esc key. But let the escape keystroke go through to the app in focus if it's not a double press (say within the space of a ...
22
votes
5
answers
38k
views
AutoHotkey in Windows 10 - Hotkeys not working in some applications
A simple script like
a::msgbox hi!
used to work fine under Windows 7. Now that I upgraded to Windows 10, it isn't working when certain windows are active. Specially LButton-Hotkeys can mess up ...
4
votes
1
answer
3k
views
How to do logins using the WinHttpRequest COM?
You can see lots of people automating things on websites using mouseclick and keystroke simulation on browser windows or using the IE COM, but for some applications you don't want your application to ...
-1
votes
1
answer
6k
views
AHK: Assign hotkey only for one specific active window and not for others
I have just done a piece of code that does the following thing. When I make a selection by mouse in Firefox or EndNote, the script sents a Ctrl+c and checks the clipboard for a regex match. If there ...
29
votes
5
answers
18k
views
Hotkey for next song in Spotify
After March 2015 upgrade of Spotify the below hotkey no longer works to get next song in Spotify:
; Spotify next track
<^>!p::
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Right}, ...
19
votes
3
answers
55k
views
What is the key scan code of the Fn key for use in AutoHotkey (AHK)?
I want to use Fn+S to emulate Ctrl+S, and so far this is my code:
#InstallKeybdHook
#Persistent
SC126 & s::
Send ^{s}
return
My problem is that I don't know the Fn key's scan code.
...
15
votes
3
answers
17k
views
AutoHotKey: Calling one script from another script
I just discovered AutoHotKey and it seems like a dream come true. I have two .ahk scripts, A.ahk and B.ahk. I want to call script B from within script A.
The AHK forums are strangely silent on the ...
12
votes
6
answers
15k
views
How can I get the current browser URL with an AutoHotKey script?
I'm looking for a way in AutoHotkey to put the currently visited url in a variable.
The goal of this AHK is to trace what I've been doing during the day to log my hours better. I have another system ...
8
votes
1
answer
7k
views
Autohotkey application-specific hotkeys
I am a newbie to Autohotkey, and I can't figure this out despite reading through this site and the official documentation.
I just want to have certain hotkeys work only with certain applications. So ...
6
votes
4
answers
26k
views
What is AU3_Spy.exe? Where can I find it?
Whenever I try to launch the Windows Spy utility in AutoHotkey, it fails with an error "Could not launch file: U:\Software\AutoHotkey_1.1.26.00\AU3_Spy.exe"
Initially I thought that I may have had a ...
5
votes
2
answers
12k
views
Find and fill an input field with AutoHotKey
A challenge to all you AutoHotKey masters:
Give us a function that will Find and Move the Cursor to an Input Field (E.g. LoginName) and, alternatively send input text. For the old, lazy hackers like ...
5
votes
3
answers
6k
views
How can I change the keys to change desktop in windows 10 with autohotkey?
Windows 10 has finally multi desktops, you can switch desktops with ctrl+win+right (or left) keys. It's a nice feature, but you have two use two hands to switch desktops.
I'm trying to map the keys ...
5
votes
4
answers
1k
views
Autohotkey: Send 5 digit hex unicode chars
I have been trying to find a way to remap my keyboard and send 5-digit hex unicode chars, the method described here: ahk Send only supports 4-digit hex codes {U+nnnn}, I know that in the past, ...
4
votes
1
answer
3k
views
How to escape # character in AHK?
I am trying to output some text with hot string. All work well except when using the # character. It produces unexpected results.
:*:.ef::C# Entity framework{Space}
I tried to escape it with ` char, ...
3
votes
3
answers
5k
views
Autohotkey and Windows 10: How to get current explorer path
I use autohotkey version: 1.0.48.05 (because I stick with activeaid).
The script to read the current path is as follows (and worked until Win 7).
; Get full path from open Explorer window
WinGetText,...
2
votes
1
answer
2k
views
how to send a letter as itself when it is used as hotkey in autohotkey
For example I want press 'v' to get 'asdfv' by autohotkey, but when I define like the below :
v::send asdfv
the script run into an infinite loop, because the last v is covered as the shortcut. So ...
1
vote
1
answer
1k
views
ControlSend randomly sending wrong characters (modified and unmodified) when using SetKeyDelay, 0, 0
I'm self-answering this question because I've seen it asked all over the Internet, but with few helpful answers, and definitely no resolutions on Stack Overflow that I can find.
Example Code
...
1
vote
1
answer
592
views
Log multiple Keys with AutoHotkey
I´m trying to let a race game play via AutoHotkey. I use this script to paste the keys i pressed into a txt to let them automaticly play back.
My problem is now that this script only can log one key, ...
1
vote
2
answers
3k
views
Call python function with arguments and get returned value in autohotkey
I have a python script called "server.py" and inside it I have a function def calcFunction(arg1): ... return output How can I call the function calcFunction with arguments and use the return value ...
1
vote
0
answers
315
views
SQLite/AutoHotkey, I have problem with Encoding of sqlite3_result_text return function
I am writing a User Define Function with SQLite in AutoHotkey.
It works well as I intended when I use (return) English only.
But, If I use (return) any character with NonEnglish, it makes broken ...