Switching input language crashes anki

I am trying to switch anki’s input language via hotkey using AutoHotkey. Unfortunately, the following script working on other applications crashes anki.

^+l:: ;CTRL+SHIFT+L en := 
DllCall("LoadKeyboardLayout", "Str","00000409", "Int", 1) WinGet, 
windows, List Loop % windows { SendMessage, 0x50, 0, %en%,, % "ahk_id " 
windows%A_Index% } return

I suppose it is a bug, but would be happy to be proven wrong and appreciate any suggestions on how to determine and resolve this issue or switch the language in a different way with AutoHotkey.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.