Isquiesque
Isquiesque

Reputation: 1

Need help troubleshooting AHK (Corrupted somehow?)

I used AutoHotKey for months with no issues, but now some (not all) of my shortcuts no longer work.

Any shortcut used to open a browser tab and go right to a site still work. For example, this…

#a::Run www.autohotkey.com

…will still bring a new tab into focus and load the AutoHotKey site when you press WIN+A. Similarly, everything I have to launch programs still works. But I was mostly using AHK to access accented letters or special characters on a laptop without a numpad. This…

!c::Send,ç

…used to produce a ç but now when you press ALT+c it generates this: ç

It doesn't seem to be tied exclusively to the ALT key. Even if I remap to avoid the ALT key I have the same issue. Below are (I believe) the affected bits in my *.ahk file.

Thanks to anyone who has ideas as to why this worked great and then one day stopped working! I would love to be able to use AutoHotKey again.

!a::Send,à
!b::Send,ß
!e::Send,è
#!e::Send,é
!i::Send,ï
!c::Send,ç
#!c::Send,Ç
!d::Send,·
!g::Send,?
!h::Send,?
!m::Send,—
!n::Send,ñ
!p::Send,¶
+!p::Send,þ
!s::Send,§
!x::Send,×
!'::Send,«
#!'::Send,»
!2::Send,²
!3::Send,³
!4::Send,¢
!7::Send,£
!=::Send,±
!/::Send,÷
+!/::Send,¿
!.::Send,…

Upvotes: 0

Views: 364

Answers (2)

miroxlav
miroxlav

Reputation: 12194

Loading of UTF-8 macros containing national charactes doesn't work correctly if you have US keyboard active during the process. Switch to national keyboard, then reload the macro file.

For example, I'm using these locale/keyboards combinations and AHK script loads fine only with two:

enter image description here

When keyboard is switched to ENG-US, instead of success I get the following error (file is always the same, encoded in UTF-8):

enter image description here

---------------------------
AutoHotkey.ahk
---------------------------
Error at line 332.

Line Text: #ú::Send {Browser_Back}
Error: Invalid hotkey.

The script was not reloaded; the old version will remain in effect.
---------------------------
OK   
---------------------------

With some other national characters, you don't get above error, but without a warning from AHK you get strange effects in interpretation of some UTF-8 characters.


AHK version: 1.1.16.05 (ahkscript.org)

Upvotes: 0

vasili111
vasili111

Reputation: 6940

  1. What version of AutoHotkey are you using? Always use AutoHotkey and its documenatation from http://ahkscript.org/ (current uptodate version, new official website)! AutoHotkey and its documentation from autohotkey.com is outdated and you may have some problems using them!

  2. Try to launch script with admin rights.

  3. Turn of antivirus software and try if script works.

  4. Check other software. Maybe some of them is using same shortcut?

Upvotes: 2

Related Questions