Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automatic switching input method
#2
Function GetInputLanguage
Code:
Copy      Help
;/
function# hwnd

ret GetKeyboardLayout(GetWindowThreadProcessId(hwnd 0))

Function SetInputLanguage
Code:
Copy      Help
;/
function hwnd lang

PostMessage hwnd WM_INPUTLANGCHANGEREQUEST 0 lang

test
Macro Macro367
Code:
Copy      Help
;swaps input languages of Notepad and WordPad

int w1=win("*Untitled - Notepad" "Notepad")
int w2=win("Document - WordPad" "WordPadClass")
int lang1=GetInputLanguage(w1)
int lang2=GetInputLanguage(w2)
out "0x%X" lang1
out "0x%X" lang2
SetInputLanguage w1 lang2
SetInputLanguage w2 lang1


Messages In This Thread
Automatic switching input method - by win - 04-07-2019, 11:15 PM
RE: Automatic switching input method - by Gintaras - 04-08-2019, 11:16 AM
RE: Automatic switching input method - by win - 06-26-2019, 08:13 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)