AutoHotKey

What is the Function key called in AutoHotkey?

痞子三分冷 提交于 2019-12-02 05:06:09
问题 I have a key labelled Fn in blue letters at the bottom of my Windows 7 keyboard. I want to trigger my AutoHotkey script whenever someone presses that key. What is the Function key called in AutoHotkey? 回答1: The problem with the Fn key is, that a lot of keyboards don't implement it as normal key, but as a modifier that changes the key messages of other keys pressed at the same time. So here is an example scenario of how Windows could see your input: Press F1 down - Windows receives the F1 down

using ahk to close a pop up dialogue within visual studio

霸气de小男生 提交于 2019-12-02 03:33:12
I've remapped a few keys, which has been working fine; however, I'm having a difficult time trying to get rid of a pop up dialogue within visual studio: Here's what I have tried: WinWaitActive, Microsoft Visual Studio If WinActive("Microsoft Visual Studio") { WinGetText, HayStack Needle = "A network-related or instance-specific error" IfInString, Haystack, %Needle% { MsgBox, The string was found. return } else Sleep, 1 } return However, I get no response whatsoever. The entire script including a few key remappings is below: SetTitleMatchMode 2 !z::Send, !{F4} !x::Send, !fc !c::Send,

how to send a letter as itself when it is used as hotkey in autohotkey

会有一股神秘感。 提交于 2019-12-01 23:43:58
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 the question is, how I can get want I want. Two ways: #UseHook On v::send asdfv or $v::send asdfv 来源: https://stackoverflow.com/questions/10427010/how-to-send-a-letter-as-itself-when-it-is-used-as-hotkey-in-autohotkey

Autohotkey: Send 5 digit hex unicode chars

别来无恙 提交于 2019-12-01 19:38:43
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, autohotkey didnt support unicode natively so it was needed some functions in order to do that, maybe thats the solution for me. Example: #If GetKeyState("CapsLock","T") +u::Send {U+1D4B0} The results from that is 풰 instead of 𝒰, and the code for 풰 is {U+D4B0}, meaning AHK is reading only the last 4 digits. How can I fix it even if I need to make new functions to achieve that? Thanks -Mark Unicode values

AutoHotKey strange issue with Copy (Ctrl-C) every other execution

懵懂的女人 提交于 2019-12-01 18:10:13
I'm new to writing my own AutoHotKey scripts so this just has to be something stupid I'm missing here. The intent of the script is for the user to select some text and press the hot-key ( Win - W ). The menu pops-up and they click the menu item. The selected text should then be copied to the clipboard. That's all i'm trying to do right now. The problem is that it works the first time, then fails, then works, then fails, etc. It basically only works every other time. I'm running Win7 x64 with the latest AutoHotKey_l (unicode 32bit). I have a timeout on the ClipWait , and it basically just waits

AutoHotKey strange issue with Copy (Ctrl-C) every other execution

ⅰ亾dé卋堺 提交于 2019-12-01 18:09:18
问题 I'm new to writing my own AutoHotKey scripts so this just has to be something stupid I'm missing here. The intent of the script is for the user to select some text and press the hot-key ( Win - W ). The menu pops-up and they click the menu item. The selected text should then be copied to the clipboard. That's all i'm trying to do right now. The problem is that it works the first time, then fails, then works, then fails, etc. It basically only works every other time. I'm running Win7 x64 with

ControlSend randomly sending wrong characters (modified and unmodified) when using SetKeyDelay, 0, 0

ぐ巨炮叔叔 提交于 2019-12-01 14:29:07
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 Consider this code, which simply writes several lines of shell commands: ^0:: SetKeyDelay, 0, 0 myWindow = ahk_exe Notepad.exe ControlSend, , set c=".cshrc-andrew.cheong"`n, %myWindow% ControlSend, , set v=".vimrc-andrew.cheong"`n, %myWindow% ControlSend, , foreach d ( /userhome/andrew.cheong /home/$USER /data/$USER )`n, %myWindow% ControlSend, , if ( -e $d/$c ) source $d/$c`n, %myWindow% ControlSend, , if

How to obtain textual contents from a window

强颜欢笑 提交于 2019-12-01 10:30:09
I have a window that displays a book. In two smaller boxes below, there is page number and volume information of the book that is open. I can get that information easily as follows: ControlGetText, volume, ThunderRT6TextBox3 ControlGetText, page, ThunderRT6TextBox2 Then my script makes my mouse pointer move to a button. It clicks it, and a new window pops open. In that window, there is more textual information related to the book, such as publisher, name author, edition etc. I want to retrieve that information. But when I try the same strategy it is not working, eg: ControlGetText, data,

How to obtain textual contents from a window

感情迁移 提交于 2019-12-01 07:36:30
问题 I have a window that displays a book. In two smaller boxes below, there is page number and volume information of the book that is open. I can get that information easily as follows: ControlGetText, volume, ThunderRT6TextBox3 ControlGetText, page, ThunderRT6TextBox2 Then my script makes my mouse pointer move to a button. It clicks it, and a new window pops open. In that window, there is more textual information related to the book, such as publisher, name author, edition etc. I want to

How to make a batch file to run a hotkey

江枫思渺然 提交于 2019-12-01 05:47:24
Every time I start my Windows I want to execute a hotkey ( Ctrl + Alt + 1 ) using a batch file and putting it in startup folder. Is that even possible? Is there a command for that? zdd You can't send keys directly from a batch file, instead you can create a VB script to send the keys and call this script from a .bat file Put the following code to a VB script, for example sendkeys.vbs (^ is Ctrl and % is Alt ) Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.SendKeys "^%1" Put the following code to a batch file, for example sendkeys.bat(required full path of the VB script if they