-1

I have an AutoHotKey program to run a language translation script named KaviPriya. It is used for Tamil language translation. Earlier it used to run well on Windows7, but since moving to Windows10, the script gives me wrong text.

Attaching the script, autohotkey.ini, which is run using autohotkey.exe.

; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments.  They are not executed.

; This script has a special filename and path because it is automatically
; launched when you run the program directly.  Also, any text file whose
; name ends in .ahk is associated with the program, which means that it
; can be launched simply by double-clicking it.  You can have as many .ahk
; files as you want, located in any folder.  You can also run more than
; one ahk file simultaneously and each will get its own tray icon.

; SAMPLE HOTKEYS: Below are two sample hotkeys.  The first is Win+Z and it
; launches a web site in the default browser.  The second is Control+Alt+N
; and it launches a new Notepad window (or activates an existing one).  To
; try out these hotkeys, run AutoHotkey again, which will load this file.

#z::Run www.autohotkey.com

^!n::
IfWinExist Untitled - Notepad
    WinActivate
else
    Run Notepad
return

; make the the scroll lock key (ScrLk) toggle all hotkeys.
Pause::Suspend

; Note: From now on whenever you run AutoHotkey directly, this script
; will be loaded.  So feel free to customize it to suit your needs.

; Please read the QUICK-START TUTORIAL near the top of the help file.
; It explains how to perform common automation tasks such as sending
; keystrokes and mouse clicks.  It also explains more about hotkeys.

; Kavipriya mapping

p::
   EnvGet, lastChar, lastChar
   %lastChar%_lowpCombination()
   Envset, lastChar,
   return

+p::
   EnvGet, lastChar, lastChar
   %lastChar%_uprpCombination()
   Envset, lastChar,
   return

`;::
   EnvGet, lastChar, lastChar
   %lastChar%_pulliCombination()
   Envset, lastChar,
   return

[::
   EnvGet, lastChar, lastChar
   %lastChar%_lsbCombination()
   Envset, lastChar,
   return

]::
   EnvGet, lastChar, lastChar
   %lastChar%_rsbCombination()
   Envset, lastChar,
   return

Numpad1::
   Send, {ControlDown}{ShiftDown}f{ShiftUp}{ControlUp}
   Suspend
   Send, chenet005
   Send, {Enter}
   Send, {U+2018}  
   Send, {ControlDown}{ShiftDown}f{ShiftUp}{ControlUp}
   Send, KavipPriya
   Suspend
   Send, {Enter}
   return

Numpad2::
   Send, {ControlDown}{ShiftDown}f{ShiftUp}{ControlUp}
   Suspend
   Send, chenet005
   Send, {Enter}
   Send, {U+2019}   
   Send, {ControlDown}{ShiftDown}f{ShiftUp}{ControlUp}
   Send, KavipPriya
   Suspend
   Send, {Enter}
   return

Numpad4::
   Send, {ControlDown}{ShiftDown}f{ShiftUp}{ControlUp}
   Suspend
   Send, chenet005
   Send, {Enter}
   Send, {U+201C}   
   Send, {ControlDown}{ShiftDown}f{ShiftUp}{ControlUp}
   Send, KavipPriya
   Suspend
   Send, {Enter}
   return

Numpad5::
   Send, {ControlDown}{ShiftDown}f{ShiftUp}{ControlUp}
   Suspend
   Send, chenet005
   Send, {Enter}
   Send, {U+201D}   
   Send, {ControlDown}{ShiftDown}f{ShiftUp}{ControlUp}
   Send, KavipPriya
   Suspend
   Send, {Enter}
   return

>::
   Send, {U+0022}
   return
-::
   Send, {U+0023}
   return
q::
   EnvSet, lastChar, q
   Send, {U+004B}
   return
w::
   EnvSet, lastChar, w
   Send, {U+005C}
   return
e::
   EnvSet, lastChar, e
   Send, {U+0053}
   return
r::
   EnvSet, lastChar, r
   Send, {U+004E}
   return
t::
   EnvSet, lastChar, t
   Send, {U+0059}
   return
y::
   EnvSet, lastChar, y
   Send, {U+0058}
   return
u::
   EnvSet, lastChar, u
   Send, {U+0057}
   return
i::
   EnvSet, lastChar, i
   Send, {U+00FB}
   return
o::
   EnvSet, lastChar, o
   Send, {U+00A5}
   return
a::
   EnvSet, lastChar, a
   Send, {U+0056}
   return
s::
   EnvSet, lastChar, s
   Send, {U+005B}
   return
d::
   EnvSet, lastChar, d
   Send, {U+005D}
   return
f::
   EnvSet, lastChar, f
   Send, {U+004C}
   return
g::
   EnvSet, lastChar, g
   Send, {U+0054}
   return
h::
   EnvSet, lastChar, h
   Send, {U+00F4}
   return
j::
   EnvSet, lastChar, j
   Send, {U+0052}
   return
k::
   EnvSet, lastChar, k
   Send, {U+0055}
   return
l::
   EnvSet, lastChar, l
   Send, {U+0050}
   return
z::
   EnvSet, lastChar, z
   Send, {U+0051}
   return
x::
   EnvSet, lastChar, x
   Send, {U+0049}
   return
c::
   EnvSet, lastChar, c
   Send, {U+0044}
   return
v::
   EnvSet, lastChar, v
   Send, {U+0046}
   return
b::
   EnvSet, lastChar, b
   Send, {U+00F9}
   return
n::
   EnvSet, lastChar, n
   Send, {U+00FA}
   return
m::
   EnvSet, lastChar, m
   Send, {U+0040}
   return
,::
   EnvSet, lastChar, COMMA
   Send, {U+0042}
   return
/::
   EnvSet, lastChar, BS
   Send, {U+002C}
   return
'::
   EnvSet, lastChar, SQUOT
   Send, {U+004D}
   return
!::
   EnvSet, lastChar, XCL
   Send, {U+005E}
   return
@::
   EnvSet, lastChar, AT
   Send, {U+00EA}
   return
#::
   EnvSet, lastChar, HASH
   Send, {U+005F}
   return
$::
   EnvSet, lastChar, DOL
   Send, {U+0063}
   return
%::
   EnvSet, lastChar, PCTG
   Send, {U+00D7}
   return
^::
   EnvSet, lastChar, CARET
   Send, {U+00D9}
   return
&::
   EnvSet, lastChar, AMP
   Send, {U+0060}
   return
*::
   EnvSet, lastChar, STAR
   Send, {U+00E7}
   return
+q::
   EnvSet, lastChar, uQ
   Send, {U+00D4}
   return
+w::
   EnvSet, lastChar, uW
   Send, {U+00DF}
   return
+e::
   EnvSet, lastChar, uE
   Send, {U+00D6}
   return
+r::
   EnvSet, lastChar, uR
   Send, {U+00D1}
   return
+t::
   EnvSet, lastChar, uT
   Send, {U+00E1}
   return
+y::
   EnvSet, lastChar, uY
   Send, {U+00DB}
   return
+u::
   EnvSet, lastChar, uU
   Send, {U+00DA}
   return
+i::
   EnvSet, lastChar, uI
   Send, {U+0048}
   return
+o::
   EnvSet, lastChar, uO
   Send, {U+00BC}
   return
{::
   EnvSet, lastChar, uLCB
   Send, {U+00FD}
   return
}::
   EnvSet, lastChar, uRCB
   Send, {U+00FE}
   return
|::
   EnvSet, lastChar, uPIP
   Send, {U+0060}
   return
+a::
   EnvSet, lastChar, uA
   Send, {U+0061}
   return
+s::
   EnvSet, lastChar, uS
   Send, {U+00DE}
   return
+d::
   EnvSet, lastChar, uD
   Send, {U+00E0}
   return
+f::
   EnvSet, lastChar, uF
   Send, {U+00CF}
   return
+g::
   EnvSet, lastChar, uG
   Send, {U+00DD}
   return
+h::
   EnvSet, lastChar, uH
   Send, {U+005A}
   return
+j::
   EnvSet, lastChar, uJ
   Send, {U+00D5}
   return
+k::
   EnvSet, lastChar, uK
   Send, {U+00D8}
   return
+l::
   EnvSet, lastChar, uL
   Send, {U+00D3}
   return
:::
   EnvSet, lastChar, uCOL
   Send, {U+00EB}
   return
"::
   EnvSet, lastChar, uDQ
   Send, {U+004F}
   return
+z::
   EnvSet, lastChar, uZ
   Send, {U+00E9}
   return
+x::
   EnvSet, lastChar, uX
   Send, {U+004A}
   return
+c::
   EnvSet, lastChar, uC
   Send, {U+0045}
   return
+v::
   EnvSet, lastChar, uV
   Send, {U+0047}
   return
+b::
   EnvSet, lastChar, uB
   Send, {U+0062}
   return
+n::
   EnvSet, lastChar, uN
   Send, {U+00E3}
   return
+m::
   EnvSet, lastChar, uM
   Send, {U+0041}
   return
<::
   EnvSet, lastChar, uLAB
   Send, {U+0043}
   return
w_pulliCombination() {
  Send, {Backspace}
  Send, {U+0074}
}
e_pulliCombination() {
  Send, {Backspace}
  Send, {U+006B}
}
r_pulliCombination() {
  Send, {Backspace}
  Send, {U+0066}
}
t_pulliCombination() {
  Send, {Backspace}
  Send, {U+0071}
}
y_pulliCombination() {
  Send, {Backspace}
  Send, {U+0070}
}
u_pulliCombination() {
  Send, {Backspace}
  Send, {U+006F}
}
a_pulliCombination() {
  Send, {Backspace}
  Send, {U+006E}
}
s_pulliCombination() {
  Send, {Backspace}
  Send, {U+0073}
}
d_pulliCombination() {
  Send, {Backspace}
  Send, {U+0075}
}
f_pulliCombination() {
  Send, {Backspace}
  Send, {U+0064}
}
g_pulliCombination() {
  Send, {Backspace}
  Send, {U+006C}
}
h_pulliCombination() {
  Send, {Backspace}
  Send, {U+006F}
}
j_pulliCombination() {
  Send, {Backspace}
  Send, {U+006A}
}
k_pulliCombination() {
  Send, {Backspace}
  Send, {U+006D}
}
l_pulliCombination() {
  Send, {Backspace}
  Send, {U+0068}
}
sQUOT_pulliCombination() {
  Send, {Backspace}
  Send, {U+0065}
}
z_pulliCombination() {
  Send, {Backspace}
  Send, {U+0069}
}
XCL_pulliCombination() {
  Send, {Backspace}
  Send, {U+0076}
}
HASH_pulliCombination() {
  Send, {Backspace}
  Send, {U+0077}
}
PIP_pulliCombination() {
  Send, {Backspace}
  Send, {U+0078}
}
AMP_pulliCombination() {
  Send, {Backspace}
  Send, {U+0078}
}
uA_pulliCombination() {
  Send, {Backspace}
  Send, {U+0079}
}
uH_pulliCombination() {
  Send, {Backspace}
  Send, {U+0072}
}
uDQ_pulliCombination() {
  Send, {Backspace}
  Send, {U+0067}
}
uB_pulliCombination() {
  Send, {Backspace}
  Send, {U+007A}
}
uPIP_pulliCombination() {
  Send, {Backspace}
  Send, {U+0078}
}
w_lowpCombination() {
  Send, {Backspace}
  Send, {U+00B1}
}
e_lowpCombination() {
  Send, {Backspace}
  Send, {U+00A8}
}
r_lowpCombination() {
  Send, {Backspace}
  Send, {U+00A3}
}
t_lowpCombination() {
  Send, {Backspace}
  Send, {U+00AE}
}
y_lowpCombination() {
  Send, {Backspace}
  Send, {U+00AD}
}
u_lowpCombination() {
  Send, {Backspace}
  Send, {U+00AC}
}
a_lowpCombination() {
  Send, {Backspace}
  Send, {U+00AB}
}
s_lowpCombination() {
  Send, {Backspace}
  Send, {U+00B0}
}
d_lowpCombination() {
  Send, {Backspace}
  Send, {U+00B2}
}
f_lowpCombination() {
  Send, {Backspace}
  Send, {U+00A1}
}
g_lowpCombination() {
  Send, {Backspace}
  Send, {U+00A9}
}
j_lowpCombination() {
  Send, {Backspace}
  Send, {U+00A7}
}
k_lowpCombination() {
  Send, {Backspace}
  Send, {U+00AA}
}
l_lowpCombination() {
  Send, {Backspace}
  Send, {U+00A5}
}
SQUOT_lowpCombination() {
  Send, {Backspace}
  Send, {U+00A2}
}
z_lowpCombination() {
  Send, {Backspace}
  Send, {U+00A6}
}
XCL_lowpCombination() {
  Send, {Backspace}
  Send, {U+00B3}
}
HASH_lowpCombination() {
  Send, {Backspace}
  Send, {U+00B4}
}
PIP_lowpCombination() {
  Send, {Backspace}
  Send, {U+00B5}
}
uA_lowpCombination() {
  Send, {Backspace}
  Send, {U+00B6}
}
uH_lowpCombination() {
  Send, {Backspace}
  Send, {U+00AF}
}
uDQ_lowpCombination() {
  Send, {Backspace}
  Send, {U+00A4}
}
uB_lowpCombination() {
  Send, {Backspace}
  Send, {U+00B7}
}
w_uprpCombination() {
  Send, {Backspace}
  Send, {U+00C8}
}
e_uprpCombination() {
  Send, {Backspace}
  Send, {U+00BF}
}
r_uprpCombination() {
  Send, {Backspace}
  Send, {U+00BA}
}
t_uprpCombination() {
  Send, {Backspace}
  Send, {U+00C5}
}
y_uprpCombination() {
  Send, {Backspace}
  Send, {U+00C4}
}
u_uprpCombination() {
  Send, {Backspace}
  Send, {U+00C3}
}
a_uprpCombination() {
  Send, {Backspace}
  Send, {U+00C2}
}
s_uprpCombination() {
  Send, {Backspace}
  Send, {U+00C7}
}
d_uprpCombination() {
  Send, {Backspace}
  Send, {U+00C9}
}
f_uprpCombination() {
  Send, {Backspace}
  Send, {U+00B8}
}
g_uprpCombination() {
  Send, {Backspace}
  Send, {U+00C0}
}
j_uprpCombination() {
  Send, {Backspace}
  Send, {U+00BE}
}
k_uprpCombination() {
  Send, {Backspace}
  Send, {U+00C1}
}
l_uprpCombination() {
  Send, {Backspace}
  Send, {U+00BC}
}
SQUOT_uprpCombination() {
  Send, {Backspace}
  Send, {U+00B9}
}
z_uprpCombination() {
  Send, {Backspace}
  Send, {U+00BD}
}
XCL_uprpCombination() {
  Send, {Backspace}
  Send, {U+00CA}
}
HASH_uprpCombination() {
  Send, {Backspace}
  Send, {U+00CB}
}
PIP_uprpCombination() {
  Send, {Backspace}
  Send, {U+00CC}
}
uA_uprpCombination() {
  Send, {Backspace}
  Send, {U+00CD}
}
uH_uprpCombination() {
  Send, {Backspace}
  Send, {U+00C6}
}
uDQ_uprpCombination() {
  Send, {Backspace}
  Send, {U+00BB}
}
uB_uprpCombination() {
  Send, {Backspace}
  Send, {U+00CE}
}
w_lsbCombination() {
  Send, {Backspace}
  Send, {U+00DF}
}
e_lsbCombination() {
  Send, {Backspace}
  Send, {U+00D6}
}
r_lsbCombination() {
  Send, {Backspace}
  Send, {U+00D1}
}
t_lsbCombination() {
  Send, {Backspace}
  Send, {U+00DC}
}
y_lsbCombination() {
  Send, {Backspace}
  Send, {U+00DB}
}
u_lsbCombination() {
  Send, {Backspace}
  Send, {U+00DA}
}
a_lsbCombination() {
  Send, {Backspace}
  Send, {U+00D9}
}
s_lsbCombination() {
  Send, {Backspace}
  Send, {U+00DE}
}
d_lsbCombination() {
  Send, {Backspace}
  Send, {U+00E0}
}
f_lsbCombination() {
  Send, {Backspace}
  Send, {U+00CF}
}
g_lsbCombination() {
  Send, {Backspace}
  Send, {U+00D7}
}
j_lsbCombination() {
  Send, {Backspace}
  Send, {U+00D5}
}
k_lsbCombination() {
  Send, {Backspace}
  Send, {U+00D8}
}
l_lsbCombination() {
  Send, {Backspace}
  Send, {U+00D3}
}
SQUOT_lsbCombination() {
  Send, {Backspace}
  Send, {U+00D0}
}
z_lsbCombination() {
  Send, {Backspace}
  Send, {U+00D4}
}
uH_lsbCombination() {
  Send, {Backspace}
  Send, {U+00DD}
}
uDQ_lsbCombination() {
  Send, {Backspace}
  Send, {U+00D2}
}
w_rsbCombination() {
  Send, {Backspace}
  Send, {U+00F1}
}
e_rsbCombination() {
  Send, {Backspace}
  Send, {U+00E8}
}
r_rsbCombination() {
  Send, {Backspace}
  Send, {U+00E3}
}
t_rsbCombination() {
  Send, {Backspace}
  Send, {U+00EE}
}
y_rsbCombination() {
  Send, {Backspace}
  Send, {U+00ED}
}
u_rsbCombination() {
  Send, {Backspace}
  Send, {U+00EC}
}
a_rsbCombination() {
  Send, {Backspace}
  Send, {U+00EB}
}
s_rsbCombination() {
  Send, {Backspace}
  Send, {U+00F0}
}
d_rsbCombination() {
  Send, {Backspace}
  Send, {U+00F2}
}
f_rsbCombination() {
  Send, {Backspace}
  Send, {U+00E1}
}
g_rsbCombination() {
  Send, {Backspace}
  Send, {U+00E9}
}
j_rsbCombination() {
  Send, {Backspace}
  Send, {U+00E7}
}
k_rsbCombination() {
  Send, {Backspace}
  Send, {U+00EA}
}
l_rsbCombination() {
  Send, {Backspace}
  Send, {U+00E5}
}
SQUOT_rsbCombination() {
  Send, {Backspace}
  Send, {U+00E2}
}
z_rsbCombination() {
  Send, {Backspace}
  Send, {U+00E6}
}
uH_rsbCombination() {
  Send, {Backspace}
  Send, {U+00EF}
}
uDQ_rsbCombination() {
  Send, {Backspace}
  Send, {U+00E4}
}


closed as too broad by Máté Juhász, Mokubai Oct 6 at 8:20

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What and how exactly is wrong? Without knowing your script and some examples it's impossible to solve your problem. Even after that it would be probably too broad for this site's scope. Your best option would be to contact the developer of the script. – Máté Juhász Oct 6 at 7:57
  • Upgrade to the latest version and install the Unicode variant. The use of INI and the way you Send the characters makes me think you used a very old (so called basic) version of AHK. The unicode version allow you to send " ä " directly - just write a small test script and be sure to save it as UTF-8 with BOM before starting it. If that works rewrite your script above the new standard. Also "EnvSet, lastChar, r" is not needed as the last key is actually stored in a local variable - autohotkey.com/docs/Variables.htm#ThisHotkey – lintalist Oct 6 at 21:04
0

Running Autohotkey as 'As Administrator' can apparently solve problems like this.

Not the answer you're looking for? Browse other questions tagged or ask your own question.