So, What I'm trying to do is add all 3 layouts but assign Grave Accent to switch only between English and Thai (and whenever i want to type in Japanese i just use the mouse to change it manually from the language bar)
here is the code
`::
SetFormat, Integer, H
WinGet, WinID,, A
ThreadID:=DllCall("GetWindowThreadProcessId", "Int", WinID, "Int", 0)
InputLocaleID:=DllCall("GetKeyboardLayout", "Int", ThreadID)
if InputLocaleID=0x4090409 ;if Eng layout switch to Th
{
Send {Shift Down}{Alt Down}{2}{Alt Up}{Shift Up}
Return
}
if InputLocaleID=0x41e041e ;if Th layout switch to Eng
{
Send {Shift Down}{Alt Down}{1}{Alt Up}{Shift Up}
Return
}
if InputLocaleID=-0x1ffefbef ;if Jap layout switch to Eng
{
Send {Shift Down}{Alt Down}{1}{Alt Up}{Shift Up}
Return
}
When the layout is Eng, it changes to thai perfectly. but the problem is when it changed to Th, the Grave Accent button is no longer Grave Accent anymore. it becomes "_" and the code just does not work. :cry: I tried to put "_::" together in the code but still it does not work. Could you please help me out? :shock:



Sign In
Create Account
Last active: Jan 05 2008 01:17 AM
Back to top
