AutoHotKey

Detect a double key press in AutoHotkey

这一生的挚爱 提交于 2019-11-29 01:06:12
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 second). How would I go about doing this? I've come up with this so far, but I can't work out how to check for the second escape key press: ~Esc:: Input, TextEntry1, L1 T1 endKey=%ErrorLevel% if( endKey != "Timeout" ) { ; perform my double press operation WinMinimize, A } return Matthew Lock Found the answer in the AutoHotkey documentation ! ; Example #4: Detects when a key has been double

AutoHotkey in Windows 10 - Hotkeys not working in some applications

孤人 提交于 2019-11-28 23:14:17
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 everything, leading to the situation where you actually need Task Manager. Here is a small list of applications in which hotkeys are not recognized anymore: (instead, as of the above script, a simple a is sent) Team Speak 3 Everything Fraps Where it does work: (examples) Editor Skype Windows Apps in general Ahk help Open Office (most programs) Can someone reproduce this? What's wrong with AutoHotkey in

Why is visual studio catching key events before autohotkey?

大兔子大兔子 提交于 2019-11-28 16:17:32
I recently switched to the Dvorak keyboard layout as a bit of an experiment. One of the most difficult parts of the transition has been dealing with hot-keys. Most hot-keys are designed with QWERTY in mind and, to make matters worse, hot-keys seem to be extremely muscle memory bound. Rather than relearn all the hot-keys, I've written an autohotkey script to translate the Dvorak layout back to QWERTY when the Ctrl , Alt , or Win keys are pressed in conjunction with other keys. It works beautifully everywhere I've tried, except Visual Studio '08. It seems keystrokes are being caught before

AHK: Assign hotkey only for one specific active window and not for others

旧巷老猫 提交于 2019-11-28 14:07:17
问题 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 is a match, it changes the clipboard contents and shows a tooltip. It works fine for these two programs. Adobe Acrobat sometimes shows an error when a Ctrl+c is sent (even if a user presses a ctrl-c Acrobat sometimes shows famous "There was an error while copying to the Clipboard. An internal

Choosing a Windows automation scripting language. AutoIt vs Autohotkey [closed]

╄→гoц情女王★ 提交于 2019-11-28 13:29:34
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I need to choose a Windows automation scripting language. Which one do you recommend; AutoIt, AutoHotkey, or an other? I have read "An

How do I automate a Java application with AutoHotkey?

Deadly 提交于 2019-11-28 12:38:51
I use a Java application at work. I need to send clicks to buttons and fill in textboxes. I would like these actions to happen in the background. The ahk_class of the window is SunAwtFrame, and none of the controls are exposed to WindowSpy. I have used JavaFerret to determine that the first button I want to press has an AccessibleAction Version Information: Java virtual machine version: 1.7.0_25 Access Bridge Java class version: 1.7.0_25 Access Bridge Java DLL version: AccessBridge 2.0.2 Access Bridge Windows DLL version: AccessBridge 2.0.2 AccessibleContext information: Name: New Call

How do I wait for Google Chrome to load a webpage before continuing in AutoHotkey?

核能气质少年 提交于 2019-11-28 11:09:22
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 wondering if there is a way in AHK for me to tell the script to wait for the browser to finish to finish loading the page rather than sleeping for a set amount of time. Is this possible? Jason Cramer While Karthik's answer is better than a sleep command, and it can function fairly well for many sites, I found that there are some problems which can creep up especially if you use this quite often. I needed a

Remove single line breaks, keep “empty” lines

[亡魂溺海] 提交于 2019-11-28 03:34:27
问题 Say I have text like the following text selected with the cursor: This is a test. This is a test. This is a test. This is a test. I would like to transform it into: This is a test. This is a test This is a test. This is a test In other words, I would like to replace single line breaks by spaces, leaving empty lines alone. I thought something like the following would work: RemoveSingleLineBreaks() { ClipSaved := ClipboardAll Clipboard = send ^c Clipboard := RegExReplace(Clipboard, "([^(\R)])(

Is it possible to catch the close button and minimize the window instead? AutoHotKey

China☆狼群 提交于 2019-11-28 02:15:30
I want all programs in my computer to be closed only by right clicking the taskbar icon and choosing close. So when I click the X button on any window, it should translate to minimize instead. How can I achieve this using AutoHotKey? vafylec This AutoHotkey script should achieve what you're looking for. Note: the code may not work correctly if aero mode is on. MouseGetPos gets the hWnd of the window under the cursor. WM_NCHITTEST gets information about the type of item under the cursor, needing a bit of fiddly maths to combine the coordinates into a 4-byte structure. The difficult bit is that

AutoHotkey in Windows 10 - Hotkeys not working in some applications

旧街凉风 提交于 2019-11-27 21:10:53
问题 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 everything, leading to the situation where you actually need Task Manager. Here is a small list of applications in which hotkeys are not recognized anymore: (instead, as of the above script, a simple a is sent) Team Speak 3 Everything Fraps Where it does work: (examples) Editor Skype Windows Apps in