I want to show/hide tabtip.exe on demand. I was able to toggle it using code given to me here.
import win32gui
from ctypes import HRESULT
from ctypes.wintypes import HWND
from comtypes import IUnknown, GUID, COMMETHOD
import comtypes.client
class ITipInvocation(IUnknown):
_iid_ = GUID("{37c994e7-432b-4834-a2f7-dce1f13b834b}")
_methods_ = [
COMMETHOD([], HRESULT, "Toggle",
( ['in'], HWND, "hwndDesktop" )
)
]
dtwin = win32gui.GetDesktopWindow();
ctsdk = comtypes.client.CreateObject("{4ce576fa-83dc-4F88-951c-9d0782b4e376}", interface=ITipInvocation)
ctsdk.Toggle(dtwin);
comtypes.CoUninitialize()
But it toggle the keyboard, I want show and hide functions separate. I am trying to use this method but can't understand how can I implement it in python. Any guide would be appreciated.
Side Note: I am new to COM and win32Api. I have been reading a lot MSDN documentation and posts on it. But there are very few available regarding these topic. If you know any good tutorial on "Using COM interface in python", it would be grateful.