Author Topic: Module Win32API in plugin PY  (Read 2775 times)

0 Members and 1 Guest are viewing this topic.

Aniv_D

  • Jr. Member
  • **
  • Posts: 42
  • Karma: 10
    • View Profile
Module Win32API in plugin PY
« on: March 01, 2018, 01:02:54 PM »
Google Translate.

Hello.
You can tell how to implement switch keyboard layout through Python
on the Internet found that you need to use this code:
Code: [Select]
import win32api
win32api.LoadKeyboardLayout ("00000409", 1)

but at its execution produces an error in the log:
python ready
Line: 1 >> import win32api
ImportError: No module named win32api


I downloaded pywin32-223.win32-py2.7.exe and unpacked it and copied the contents it into
"VoxCommando\plugins\PY\Lib\site-packages"
At me it left here so on pic.1 but the error remained.
what am I doing wrong?

and if you are not complicated then you can tell how to do the following. command
checking the current layout of the language
if the layout is equal to Russian, then switch it to English


Thanks!
« Last Edit: March 01, 2018, 01:06:11 PM by Aniv_D »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Module Win32API in plugin PY
« Reply #1 on: March 01, 2018, 02:22:57 PM »
I don't know the answer to your question but it's very important when looking for a solution to remember that VoxCommando is using IronPython.  When it comes to dealing with anything that is not straight python code, especially interacting with the Windows OS it makes a very big difference.

If you find a solution for a different type of Python like CPython it probably won't work.  You need to look specifically for a way to do this in IronPython.

It would probably be a lot easier to write your own plugin using C#.  If you are interested in doing that I can help.