I've been using a script for some time (over a year) now and just started to experience problems with it. Two events have occurred recently which may have some bearing on the problem: (1) I updated my version of AH to 1.1.22.09 (a few days ago), and (2) my Windows 10 just got upgraded to build 10586 (yesterday, Nov. 13).
Here is my script:
+^p::Send {ASC 718}
+^l::Send {ASC 697}
+^o::Send {ASC 449}
+^k::Send {ASC 448}
+^m::Send {ASC 8212}
+^i::Send {ASC 8804}
+^j::Send {ASC 8805}
return
As you can see, it is a simple script.
Today, it has gone all bonkers. The combination of Control, Shift and the p key now brings up the Windows print dialog. The combination of Control, Shift and the l (lowercase L) key produces varying lengths of a combination of two of the other mappings. I have attempted to solve this issue all day with all of the AH resources I can research, to no avail.
I did find that if I put the following line (and only this line) in my script, I got what I expected:
~Control & ~Shift
However, I was unable to take this any further.
Any help would be greatly appreciated.
Baffled - basic hotkey and auto-replace.
Re: Baffled - basic hotkey and auto-replace.
Code: Select all
~+~^p::Send {ASC 718}
~+~^l::Send {ASC 697}
~+~^o::Send {ASC 449}
~+~^k::Send {ASC 448}
~+~^m::Send {ASC 8212}
~+~^i::Send {ASC 8804}
~+~^j::Send {ASC 8805}
Re: Baffled - basic hotkey and auto-replace.
Xtra, this does not yet solve the problem. For reference, I am using this script with a MS Word 2007 document.
The ~+~^p still brings up the print dialog. The ~+~^l causes a style change and then inserts 2 non-printable characters followed by the correct (asc 697) character. The ~+~^o produces the correct character but also brings up the Research dialog.
Since this script worked correctly prior to the upgrade of Windows 10 to the latest build, I suspect an issue with either drivers or some other low-level mechanism.
When I was able to get the desired results using the ~Control & ~Shift key combination, I could not figure out how to combine them with the p or l or any other key. Is there a way to do this?
Any other suggestions?
Again, thank you.
The ~+~^p still brings up the print dialog. The ~+~^l causes a style change and then inserts 2 non-printable characters followed by the correct (asc 697) character. The ~+~^o produces the correct character but also brings up the Research dialog.
Since this script worked correctly prior to the upgrade of Windows 10 to the latest build, I suspect an issue with either drivers or some other low-level mechanism.
When I was able to get the desired results using the ~Control & ~Shift key combination, I could not figure out how to combine them with the p or l or any other key. Is there a way to do this?
Any other suggestions?
Again, thank you.
Re: Baffled - basic hotkey and auto-replace.
I would try running your original script as admin.
Re: Baffled - basic hotkey and auto-replace.
Remove ~. Its purpose is to allow the keystrokes to pass through to the active window, which I think is the opposite of what you want.
Try adding #UseHook to the top of the script.
Try adding #UseHook to the top of the script.
Re: Baffled - basic hotkey and auto-replace.
Thank you. I have found that if I simply use the Win key and a single letter key (avoiding the L) all works correctly. This is also a simpler solution than what I used originally.
Re: Baffled - basic hotkey and auto-replace.
Btw, the {ASC nnnn} syntax produces an Alt+Numpad combination which can be unreliable, especially for non-ASCII characters. If you're using a Unicode version of AutoHotkey and you save your script as UTF-8 with BOM (Notepad just calls it "UTF-8"), you can just write the character directly in the script:
Another alternative (which requires any recent version of AutoHotkey) is to use the newer {U+xxxx} syntax, where xxxx is a hexadecimal Unicode character code. For example, {ASC 8805} (with a program which supports it) is equivalent to {U+2265}.
The Windows Character Map program displays these U+ codes at the bottom of its window.
Code: Select all
Send ≥
Code: Select all
MsgBox % Format("{{}U+{:04x}{}}", 8805)
Who is online
Users browsing this forum: Google [Bot], peter_ahk and 294 guests