autoit 將輸入法修改成英文輸入法

若是能用ControlSend,就不推薦用send,若是非要用send,能夠切換輸入法爲英文再send.spa

$hWnd = WinGetHandle("[ACTIVE]");$hWnd 爲目標窗口句柄,這裏設置的是當前活動窗口
$ret = DllCall("user32.dll", "long", "LoadKeyboardLayout", "str", "08040804", "int", 1 + 0)
DllCall("user32.dll", "ptr", "SendMessage", "hwnd", $hWnd, "int", 0x50, "int", 1, "int", $ret[0])        
Send('nh')
相關文章
相關標籤/搜索